Skip to content

Commit

Permalink
Minor tweak to FasterXML#4063
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 3, 2023
1 parent ef23d8c commit 7d112ec
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ public class NativeImageUtil {

private static final boolean RUNNING_IN_SVM = System.getProperty("org.graalvm.nativeimage.imagecode") != null;

private NativeImageUtil() {
}
private NativeImageUtil() { }

/**
* Check whether we're running in SubstrateVM native image and also in "runtime" mode.
* The "runtime" check cannot be a constant, because
* the static initializer may run early during build time
*<p>
* As optimization, {@link #RUNNING_IN_SVM} is used to short-circuit on normal JVMs.
* As optimization, {@code RUNNING_IN_SVM} is used to short-circuit on normal JVMs.
*
* @since 2.16
*/
private static boolean isInNativeImageAndIsAtRuntime() {
public static boolean isInNativeImageAndIsAtRuntime() {
return RUNNING_IN_SVM && "runtime".equals(System.getProperty("org.graalvm.nativeimage.imagecode"));
}

Expand Down

0 comments on commit 7d112ec

Please sign in to comment.