You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running in a native image, System.getProperty("java.home") will return null (as there is no Java involved).
The native image team wants to add a warning if this code is called as this can lead to subtle bugs. We should review our System.getProperty("java.home") usages and either remove them if not needed or guard for null / do not execute them when running in a native image.
The text was updated successfully, but these errors were encountered:
org.springframework.boot.loader.tools.JavaExecutable, which uses java.home, is used by the Maven plugin and by the CLI, both no candidates for native image.
org.springframework.boot.system.ApplicationTemp#generateHash calculates a SHA-1 hash over different parts of data, one of which is java.home. The code still works if java.home is null.
This class is used by our webservers for the session store directory.
If we want to get rid of the planned native image warning, we could add this:
if (!NativeDetector.inNativeImage()) {
update(digest, System.getProperty("java.home"));
}
When running in a native image,
System.getProperty("java.home")
will returnnull
(as there is no Java involved).The native image team wants to add a warning if this code is called as this can lead to subtle bugs. We should review our
System.getProperty("java.home")
usages and either remove them if not needed or guard for null / do not execute them when running in a native image.The text was updated successfully, but these errors were encountered: