8284697: Avoid parsing the doc comment of an element that is not documented

Reviewed-by: jjg
This commit is contained in:
Pavel Rappo 2022-04-19 16:27:13 +00:00
parent eb9c457b41
commit 13fb1eed52

@ -463,7 +463,8 @@ public class VisibleMemberTable {
}
private boolean mustDocument(Element e) {
return !utils.hasHiddenTag(e) && utils.shouldDocument(e);
// these checks are ordered in a particular way to avoid parsing unless absolutely necessary
return utils.shouldDocument(e) && !utils.hasHiddenTag(e);
}
private boolean allowInheritedMembers(Element e, Kind kind, LocalMemberTable lmt) {