Commit 6447dd1 1 parent 00df37e commit 6447dd1 Copy full SHA for 6447dd1
File tree 1 file changed +8
-1
lines changed
doc-tools/missing-doclet/src/main/java/org/opensearch/missingdoclet
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -332,13 +332,20 @@ private void checkComment(Element element) {
332
332
333
333
// Ignore classes annotated with @Generated and all enclosed elements in them.
334
334
private boolean isGenerated (Element element ) {
335
- return element
335
+ final boolean isGenerated = element
336
336
.getAnnotationMirrors ()
337
337
.stream ()
338
338
.anyMatch (m -> m
339
339
.getAnnotationType ()
340
340
.toString () /* ClassSymbol.toString() returns class name */
341
341
.equalsIgnoreCase ("javax.annotation.Generated" ));
342
+
343
+ if (!isGenerated && element .getEnclosingElement () != null ) {
344
+ // check if enclosing element is generated
345
+ return isGenerated (element .getEnclosingElement ());
346
+ }
347
+
348
+ return isGenerated ;
342
349
}
343
350
344
351
private boolean hasInheritedJavadocs (Element element ) {
You can’t perform that action at this time.
0 commit comments