src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java Tue Jun 04 13:34:50 2019 +0530
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java Tue Jun 04 16:20:42 2019 +0200
@@ -3032,11 +3032,11 @@
*/
public TreePath getTreePath(Element e) {
DocCommentDuo duo = dcTreeCache.get(e);
- if (isValidDuo(duo) && duo.treePath != null) {
+ if (duo != null && duo.treePath != null) {
return duo.treePath;
}
duo = configuration.cmtUtils.getSyntheticCommentDuo(e);
- if (isValidDuo(duo) && duo.treePath != null) {
+ if (duo != null && duo.treePath != null) {
return duo.treePath;
}
Map<Element, TreePath> elementToTreePath = configuration.workArounds.getElementToTreePath();
@@ -3062,20 +3062,20 @@
ElementKind kind = element.getKind();
if (kind == ElementKind.PACKAGE || kind == ElementKind.OTHER) {
duo = dcTreeCache.get(element); // local cache
- if (!isValidDuo(duo) && kind == ElementKind.PACKAGE) {
+ if (duo == null && kind == ElementKind.PACKAGE) {
// package-info.java
duo = getDocCommentTuple(element);
}
- if (!isValidDuo(duo)) {
+ if (duo == null) {
// package.html or overview.html
duo = configuration.cmtUtils.getHtmlCommentDuo(element); // html source
}
} else {
duo = configuration.cmtUtils.getSyntheticCommentDuo(element);
- if (!isValidDuo(duo)) {
+ if (duo == null) {
duo = dcTreeCache.get(element); // local cache
}
- if (!isValidDuo(duo)) {
+ if (duo == null) {
duo = getDocCommentTuple(element); // get the real mccoy
}
}