LauncherFromOptions.create() not properly handling FileAssociationNoExtensionsException.

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: 26
    • Component/s: tools

      This finding is highlighted by a static analysis tool.
      in class: open/src/jdk.jpackage/share/classes/jdk/jpackage/internal/LauncherFromOptions.java
        try {
                      faGroup = faGroupBuilder.create();
                  } catch (FileAssociationNoMimesException ex) {
                      throw I18N.buildConfigException()
                              .message("error.no-content-types-for-file-association", faID)
                              .advice("error.no-content-types-for-file-association.advice", faID)
                              .create();
                  } catch (FileAssociationNoExtensionsException ex) {
                      // TODO: Must do something about this condition!
       -- throw new AssertionError();
                  }

      As noted in the TODO comment, FileAssociationNoExtensionsException should be handled differently, rethrow or throw a custom Exception

            Assignee:
            Alexey Semenyuk
            Reporter:
            Fernando Guallini
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: