8219575: jdk/javadoc/tool/removeOldDoclet/RemoveOldDoclet test fails in mach5

Reviewed-by: hannesw
This commit is contained in:
Priya Lakshmi Muthuswamy 2019-02-22 19:58:22 +05:30
parent 74d466fd5f
commit 2c2ca43c15

View File

@ -756,6 +756,13 @@ public class Start extends ToolOption.Helper {
}
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;
}
}
}