changeset 55106:b47fd614c75e

8219575: jdk/javadoc/tool/removeOldDoclet/RemoveOldDoclet test fails in mach5 Reviewed-by: hannesw
author pmuthuswamy
date Fri, 22 Feb 2019 19:58:22 +0530
parents b22d8ae270a2
children 0abec72a3ac2
files src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
+                }
             }
         }