< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java

Print this page

        

*** 3030,3044 **** * @param e an Element * @return TreePath */ public TreePath getTreePath(Element e) { DocCommentDuo duo = dcTreeCache.get(e); ! if (duo != null && duo.treePath != null) { return duo.treePath; } duo = configuration.cmtUtils.getSyntheticCommentDuo(e); ! if (duo != null && duo.treePath != null) { return duo.treePath; } Map<Element, TreePath> elementToTreePath = configuration.workArounds.getElementToTreePath(); TreePath path = elementToTreePath.get(e); if (path != null || elementToTreePath.containsKey(e)) { --- 3030,3044 ---- * @param e an Element * @return TreePath */ public TreePath getTreePath(Element e) { DocCommentDuo duo = dcTreeCache.get(e); ! if (isValidDuo(duo) && duo.treePath != null) { return duo.treePath; } duo = configuration.cmtUtils.getSyntheticCommentDuo(e); ! if (isValidDuo(duo) && duo.treePath != null) { return duo.treePath; } Map<Element, TreePath> elementToTreePath = configuration.workArounds.getElementToTreePath(); TreePath path = elementToTreePath.get(e); if (path != null || elementToTreePath.containsKey(e)) {
*** 3060,3083 **** DocCommentDuo duo = null; ElementKind kind = element.getKind(); if (kind == ElementKind.PACKAGE || kind == ElementKind.OTHER) { duo = dcTreeCache.get(element); // local cache ! if (duo == null && kind == ElementKind.PACKAGE) { // package-info.java duo = getDocCommentTuple(element); } ! if (duo == null) { // package.html or overview.html duo = configuration.cmtUtils.getHtmlCommentDuo(element); // html source } } else { duo = configuration.cmtUtils.getSyntheticCommentDuo(element); ! if (duo == null) { duo = dcTreeCache.get(element); // local cache } ! if (duo == null) { duo = getDocCommentTuple(element); // get the real mccoy } } DocCommentTree docCommentTree = isValidDuo(duo) ? duo.dcTree : null; --- 3060,3083 ---- DocCommentDuo duo = null; ElementKind kind = element.getKind(); if (kind == ElementKind.PACKAGE || kind == ElementKind.OTHER) { duo = dcTreeCache.get(element); // local cache ! if (!isValidDuo(duo) && kind == ElementKind.PACKAGE) { // package-info.java duo = getDocCommentTuple(element); } ! if (!isValidDuo(duo)) { // package.html or overview.html duo = configuration.cmtUtils.getHtmlCommentDuo(element); // html source } } else { duo = configuration.cmtUtils.getSyntheticCommentDuo(element); ! if (!isValidDuo(duo)) { duo = dcTreeCache.get(element); // local cache } ! if (!isValidDuo(duo)) { duo = getDocCommentTuple(element); // get the real mccoy } } DocCommentTree docCommentTree = isValidDuo(duo) ? duo.dcTree : null;
< prev index next >