Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8362352

Redundant check for predefined app image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 25
    • tools
    • 25

      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 with JDK-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

            asemenyuk Alexey Semenyuk
            almatvee Alexander Matveev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: