Don't rewrite non-reloading types.

Fixes https://github.com/spring-projects/spring-loaded/issues/165
This commit is contained in:
graemerocher
2017-03-17 12:15:09 +01:00
parent 386a7dcb03
commit d1d0864905

View File

@@ -1045,6 +1045,11 @@ public class MethodInvokerRewriter {
throw new IllegalStateException("Unable to find classId for " + slashedclassname
+ " referenced from invokedynamic in " + this.methodname + "()");
}
if(typeRegistry.getReloadableType(classId) == null) {
// can't rewrite non-reloading type
super.visitInvokeDynamicInsn(name, desc, bsm, bsmArgs);
return;
}
// Initially only rewriting use of INVOKEDYNAMIC to support Lambda execution
// TODO support the more general invokedynamic usage