File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
spring-core/src/main/java/org/springframework/cglib/core Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 26
26
import org .springframework .asm .ClassReader ;
27
27
import org .springframework .cglib .core .internal .Function ;
28
28
import org .springframework .cglib .core .internal .LoadingCache ;
29
+ import org .springframework .core .NativeDetector ;
29
30
30
31
/**
31
32
* Abstract class for all code-generating CGLIB utilities.
@@ -359,6 +360,11 @@ protected Class generate(ClassLoaderData data) {
359
360
// ignore
360
361
}
361
362
}
363
+ // SPRING PATCH BEGIN
364
+ if (NativeDetector .inNativeImage ()) {
365
+ throw new UnsupportedOperationException ("CGLIB enhancement should not happen at runtime on native image" );
366
+ }
367
+ // SPRING PATCH END
362
368
byte [] b = strategy .generate (this );
363
369
String className = ClassNameReader .getClassName (new ClassReader (b ));
364
370
ProtectionDomain protectionDomain = getProtectionDomain ();
You can’t perform that action at this time.
0 commit comments