While working on JDK-8351073 it was noticed that getPredefinedAppImage() [1] checks if predefined app image exists and will throw exception if it does not. Exception code refers to non-existing resource string named "message.app-image-dir-does-not-exist" as result it will throw null pointer exception. However, I cannot trigger this code, since DeployParams at line 207 [2] will check predefine app image and throw exception.
DeployParams is old check, but getPredefinedAppImage() was introduced withJDK-8333664.
If we have redundant check it needs to be removed. I tested on macOS, but it is shared code it needs to be evaluated for all platforms. In any case we should not reference non-existing resource string.
P4 since it does not cause any issues yet.
[1] https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java#L536
[2] https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java#L207
DeployParams is old check, but getPredefinedAppImage() was introduced with
If we have redundant check it needs to be removed. I tested on macOS, but it is shared code it needs to be evaluated for all platforms. In any case we should not reference non-existing resource string.
P4 since it does not cause any issues yet.
[1] https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java#L536
[2] https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java#L207
- relates to
-
JDK-8333664 Decouple command line parsing and package building in jpackage
-
- Resolved
-