Fix #166? setAccessible before making invocation

This commit is contained in:
Andy Clement
2016-04-10 15:04:23 -07:00
parent 3c05197d48
commit cfb3a22b8c
2 changed files with 2 additions and 0 deletions

View File

@@ -565,6 +565,7 @@ public class ReloadableType {
break;
}
}
found.setAccessible(true);
byte[] bs = (byte[]) found.invoke(a, b);
proxy.loadNewVersion(versionsuffix, bs);
proxy.runStaticInitializer();
@@ -935,6 +936,7 @@ public class ReloadableType {
// TODO needs configurable debug that dumps loaded byte data at this point
// Define the permanent piece
// DEFAULT METHODS - remove the if
if (!typedescriptor.isInterface()) {
typeRegistry.defineClass(Utils.getInterfaceName(dottedtypename), interfaceBytes, true);
}