8219575: jdk/javadoc/tool/removeOldDoclet/RemoveOldDoclet test fails in mach5
Reviewed-by: hannesw
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java Fri Feb 22 14:20:06 2019 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java Fri Feb 22 19:58:22 2019 +0530
@@ -756,6 +756,13 @@
}
String text = messager.getText("main.doclet_class_not_found", userDocletName);
throw new ToolException(CMDERR, text, cnfe);
+ } catch (NoClassDefFoundError ncfe) {
+ if (ncfe.getMessage().contains("com/sun/javadoc/Doclet")) {
+ String text = messager.getText("main.not_a_doclet", userDocletName);
+ throw new ToolException(ERROR, text, ncfe);
+ } else {
+ throw ncfe;
+ }
}
}