Fix erroneous error message from ModifyVariable queries, closes #199

This commit is contained in:
Mumfrey committed 2017-07-24 16:14:26 +01:00
1 parent d03215856d
commit 333083aa64
2 files changed
+2 -2

No files matched your search

@@ -669,7 +669,7 @@ public abstract class InjectionPoint {
throw new InvalidInjectionException(context, message);
}
private String getAtCode() {
protected String getAtCode() {
AtCode code = this.getClass().<AtCode>getAnnotation(AtCode.class);
return code == null ? this.getClass().getName() : code.value();
}
@@ -81,7 +81,7 @@ public class ModifyVariableInjector extends Injector {
@Override
public boolean find(String desc, InsnList insns, Collection<AbstractInsnNode> nodes) {
throw new InvalidInjectionException(this.context, "STORE injection point must be used in conjunction with @ModifyVariable");
throw new InvalidInjectionException(this.context, this.getAtCode() + " injection point must be used in conjunction with @ModifyVariable");
}
abstract boolean find(Target target, Collection<AbstractInsnNode> nodes);