From d40121845e0e1ace6b349180ced53292353dbb7c Mon Sep 17 00:00:00 2001 From: Nanda kumar Date: Sun, 1 Jul 2018 17:11:46 +0530 Subject: [PATCH] HADOOP-15574: Suppress build error if there are no docs after excluding private annotations. Contributed by Takanobu Asanuma. --- .../tools/ExcludePrivateAnnotationsStandardDoclet.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/ExcludePrivateAnnotationsStandardDoclet.java b/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/ExcludePrivateAnnotationsStandardDoclet.java index 2176ea55d6..5c535c8e9e 100644 --- a/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/ExcludePrivateAnnotationsStandardDoclet.java +++ b/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/ExcludePrivateAnnotationsStandardDoclet.java @@ -38,7 +38,11 @@ public static LanguageVersion languageVersion() { public static boolean start(RootDoc root) { System.out.println( ExcludePrivateAnnotationsStandardDoclet.class.getSimpleName()); - return Standard.start(RootDocProcessor.process(root)); + RootDoc excludedDoc = RootDocProcessor.process(root); + if (excludedDoc.specifiedPackages().length == 0) { + return true; + } + return Standard.start(excludedDoc); } public static int optionLength(String option) {