File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
spring-core/src/main/java/org/springframework Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ public abstract class AotDetector {
39
39
*/
40
40
public static final String AOT_ENABLED = "spring.aot.enabled" ;
41
41
42
- private static final boolean inNativeImage = NativeDetector .inNativeImage (Context .RUNTIME , Context .BUILD_TIME );
42
+ private static final boolean inNativeImage = NativeDetector .inNativeImage (Context .RUN , Context .BUILD );
43
+
43
44
44
45
/**
45
46
* Determine whether AOT optimizations must be considered at runtime. This
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ public abstract class NativeDetector {
32
32
33
33
private static final boolean inNativeImage = (imageCode != null );
34
34
35
+
35
36
/**
36
37
* Returns {@code true} if running in a native image context (for example
37
38
* {@code buildtime}, {@code runtime}, or {@code agent}) expressed by setting the
@@ -55,23 +56,23 @@ public static boolean inNativeImage(Context... contexts) {
55
56
return false ;
56
57
}
57
58
59
+
58
60
/**
59
61
* Native image context as defined in GraalVM's
60
62
* <a href="https://github.com/oracle/graal/blob/master/sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/ImageInfo.java">ImageInfo</a>.
61
- *
62
63
* @since 6.0.10
63
64
*/
64
65
public enum Context {
65
66
66
67
/**
67
68
* The code is executing in the context of image building.
68
69
*/
69
- BUILD_TIME ("buildtime" ),
70
+ BUILD ("buildtime" ),
70
71
71
72
/**
72
73
* The code is executing at image runtime.
73
74
*/
74
- RUNTIME ("runtime" );
75
+ RUN ("runtime" );
75
76
76
77
private final String key ;
77
78
@@ -83,7 +84,6 @@ public enum Context {
83
84
public String toString () {
84
85
return this .key ;
85
86
}
86
-
87
87
}
88
88
89
89
}
You can’t perform that action at this time.
0 commit comments