Merge remote-tracking branch 'origin/pr/299' into 0.8

This commit is contained in:
Mumfrey committed 2019-09-16 18:17:20 +01:00
commit 9965dd48a0
1 file changed
+6 -4
@@ -158,13 +158,15 @@ public class BeforeInvoke extends InjectionPoint {
this.log("{} is searching for an injection point in method with descriptor {}", this.className, desc);
boolean hasDescriptor = this.target instanceof ITargetSelectorByName && ((ITargetSelectorByName)this.target).getDesc() == null;
if (!this.find(desc, insns, nodes, this.target, SearchType.STRICT) && hasDescriptor && this.allowPermissive) {
boolean found = this.find(desc, insns, nodes, this.target, SearchType.STRICT);
if (!found && hasDescriptor && this.allowPermissive) {
this.logger.warn("STRICT match for {} using \"{}\" in {} returned 0 results, attempting permissive search. "
+ "To inhibit permissive search set mixin.env.allowPermissiveMatch=false", this.className, this.target, this.context);
return this.find(desc, insns, nodes, this.target, SearchType.PERMISSIVE);
found = this.find(desc, insns, nodes, this.target, SearchType.PERMISSIVE);
}
return true;
return found;
}
protected boolean find(String desc, InsnList insns, Collection<AbstractInsnNode> nodes, ITargetSelector selector, SearchType searchType) {