diff options
author | Andrea Falcone <asfalcone@google.com> | 2020-05-20 01:01:03 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-05-20 01:01:03 +0000 |
commit | a1d88686c1f60a55283a376145d5b3d7ff4b072f (patch) | |
tree | 78710f90dad1c430323b3de731a9496fa994f264 | |
parent | 466a9cc0a42a8f84b3936431cba3d617638d5431 (diff) | |
parent | 796ec8aca01e6e8fad5a4208bfa8a1907123baba (diff) | |
download | dokka-a1d88686c1f60a55283a376145d5b3d7ff4b072f.tar.gz |
Revert racy code and test for inherited methods am: 796ec8aca0
Change-Id: Ia5d04e3cb52e2e540cb0d3ebc24d0209c44eb583
-rw-r--r-- | core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt | 14 | ||||
-rw-r--r-- | core/testdata/format/dac/inheritedMethods/dac-as-java/Child.html | 29 |
2 files changed, 1 insertions, 42 deletions
diff --git a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt index 8776da4c2..ed4d36687 100644 --- a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt +++ b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt @@ -209,20 +209,8 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder { superTypes.filter { !ignoreSupertype(it) }.forEach { superType -> node.appendType(superType, NodeKind.Supertype) val superClass = superType.resolve() - // parentNode is the actual DocumentationNode of this class's supertype - // It is necessary to create documentation links back to the superclass from inherited methods - val parentNode = refGraph.lookup(superType.typeSignature()) - if (superClass != null && parentNode != null) { + if (superClass != null) { link(superClass, node, RefKind.Inheritor) - // Explicitly add the methods of the superclass (which are not overridden) as nodes to this class - val overriddenMethods = methods.toList().flatMap { it.findSuperMethods().toList() } - val inheritedMethods = superClass.methods.filter { it !in overriddenMethods }.toTypedArray() - - node.appendChildren(inheritedMethods, RefKind.InheritedMember) { - val child = build() - child.addReferenceTo(parentNode, RefKind.Owner) - return@appendChildren child - } } } diff --git a/core/testdata/format/dac/inheritedMethods/dac-as-java/Child.html b/core/testdata/format/dac/inheritedMethods/dac-as-java/Child.html index 65e2addb0..a66d0bf6c 100644 --- a/core/testdata/format/dac/inheritedMethods/dac-as-java/Child.html +++ b/core/testdata/format/dac/inheritedMethods/dac-as-java/Child.html @@ -60,35 +60,6 @@ </tr> </tbody> </table> - <table class="responsive" id="inhmethods"> - <tbody> - <tr> - <th colSpan="2"> - <devsite-heading ds-is="heading" text="Inherited functions" id="inherited-functions" level="h3" toc="" class=""> - <h3 is-upgraded="">Inherited functions</h3> - </devsite-heading> - </th> - </tr> - <tr class="api apilevel-"> - <td colSpan="2"> - <div class="expandable jd-inherited-apis"><span class="expand-control exw-expanded">From class <code><a href="Parent.html#">Parent</a></code></span> - <table class="responsive exw-expanded-content"> - <tbody> - <tr class="api apilevel-" data-version-added="ApiLevel:"> - <td><code><span class="identifier">void</span></code></td> - <td width="100%"><code><a href="Parent.html#foo()">foo</a>()</code> - <p> - <p>Do a superclass foo</p> - </p> - </td> - </tr> - </tbody> - </table> - </div> - </td> - </tr> - </tbody> - </table> <h2>Public constructors</h2> <a name="Child()"></a> <div class="api apilevel-" data-version-added=""> |