Skip to content

Commit 6278884

Browse files
authored
Expose NativeImageUtil.isRunningInNativeImage() method (#4060)
1 parent ad103be commit 6278884

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

release-notes/VERSION-2.x

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Project: jackson-databind
5555
(contributed by Joo-Hyuk K)
5656
#4056: Provide the "ObjectMapper.treeToValue(TreeNode, TypeReference)" method
5757
(contributed by @fantasy0v0)
58+
#4060: Expose `NativeImageUtil.isRunningInNativeImage()` method
5859

5960
2.15.3 (not yet released)
6061

src/main/java/com/fasterxml/jackson/databind/util/NativeImageUtil.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ private NativeImageUtil() {
2121
/**
2222
* Check whether we're running in substratevm native image runtime mode. This check cannot be a constant, because
2323
* the static initializer may run early during build time
24+
*<p>
25+
* NOTE: {@code public} since 2.16 (before that, {@code private}).
2426
*/
25-
private static boolean isRunningInNativeImage() {
27+
public static boolean isRunningInNativeImage() {
2628
return RUNNING_IN_SVM && "runtime".equals(System.getProperty("org.graalvm.nativeimage.imagecode"));
2729
}
2830

0 commit comments

Comments
 (0)