Skip to content

Commit

Permalink
Pass ModifyInjectionPoint for missing At annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD committed Mar 23, 2024
1 parent f2a8646 commit 4df54c1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public Codec<? extends MethodTransform> codec() {

@Override
public Patch.Result apply(ClassNode classNode, MethodNode methodNode, MethodContext methodContext, PatchContext context) {
AnnotationHandle annotation = methodContext.injectionPointAnnotationOrThrow();
AnnotationHandle annotation = methodContext.injectionPointAnnotation();
if (annotation == null) {
// Likely an @Overwrite
return Patch.Result.PASS;
}
if (this.value != null) {
AnnotationValueHandle<String> handle = annotation.<String>getValue("value").orElseThrow(() -> new IllegalArgumentException("Missing value handle"));
handle.set(this.value);
Expand Down

0 comments on commit 4df54c1

Please sign in to comment.