-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update NativeImageUtil
method name and expose new getter
#4063
Update NativeImageUtil
method name and expose new getter
#4063
Conversation
@yawkat Could you please take a look when you have time? |
* @since 2.16 | ||
*/ | ||
public static boolean isInNativeImage() { | ||
return System.getProperty("org.graalvm.nativeimage.imagecode") != null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check can be inlined into RUNNING_IN_SVM, because it doesnt care whether the value is buildtime or runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And still keep this method, right? Using in FasterXML/jackson-modules-base#217
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so this should just return RUNNING_IN_SVM
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
NativeImageUtil
method name and expose new getter isInSVM()
NativeImageUtil
method name and expose new getter
these names are much better, thanks :) |
(As discussed in FasterXML/jackson-modules-base#217 (comment))
Motivation
Checks around native image needs update
Modifications
isRunningInNativeImage()
toisInNativeImageAndIsAtRuntime()
private
for method above (1)isInNativeImage()
for only checking if we are in Native Image --will be used in Follow up wrt #191 by usingNativeImageUtil.isRunningInNativeImage()
indatabind
jackson-modules-base#217