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
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
- relates to
-
JDK-8356576 Better fa test coverage
-
- Open
-