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