inNativeImage

This commit is contained in:
redkale
2024-10-11 20:05:10 +08:00
parent 45b0e7098b
commit acf8eb1ce0

View File

@@ -527,16 +527,16 @@ public abstract class Sncp {
}
newDynName += "_" + (normal ? name : hash(name));
}
// if (Utility.inNativeImage() || methodBoost == null) { // 加强动态时不能重复加载
try {
final String newDynClass = newDynName.replace('/', '.');
return (Class<T>) classLoader.findClass(newDynClass);
} catch (ClassNotFoundException e) {
// do nothing
} catch (Throwable t) {
t.printStackTrace();
if (Utility.inNativeImage() || methodBoost == null) { // || methodBoost == null 加强动态时不能重复加载
try {
final String newDynClass = newDynName.replace('/', '.');
return (Class<T>) classLoader.findClass(newDynClass);
} catch (ClassNotFoundException e) {
// do nothing
} catch (Throwable t) {
t.printStackTrace();
}
}
// }
// ------------------------------------------------------------------------------
ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
FieldVisitor fv;