Skip to content

Commit

Permalink
Expose NativeImageUtil.isRunningInNativeImage() method (#4060)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 27, 2023
1 parent ad103be commit 6278884
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Project: jackson-databind
(contributed by Joo-Hyuk K)
#4056: Provide the "ObjectMapper.treeToValue(TreeNode, TypeReference)" method
(contributed by @fantasy0v0)
#4060: Expose `NativeImageUtil.isRunningInNativeImage()` method

2.15.3 (not yet released)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ private NativeImageUtil() {
/**
* Check whether we're running in substratevm native image runtime mode. This check cannot be a constant, because
* the static initializer may run early during build time
*<p>
* NOTE: {@code public} since 2.16 (before that, {@code private}).
*/
private static boolean isRunningInNativeImage() {
public static boolean isRunningInNativeImage() {
return RUNNING_IN_SVM && "runtime".equals(System.getProperty("org.graalvm.nativeimage.imagecode"));
}

Expand Down

0 comments on commit 6278884

Please sign in to comment.