summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorC. Sean Young <csyoung@google.com>2015-08-06 12:15:32 -0500
committerC. Sean Young <csyoung@google.com>2015-09-18 10:21:11 -0500
commit77cd5e5e5065038ab04a8dee21012d42a81458a4 (patch)
tree8beb566269b15b3dfaf9dda65e32ccae3bedd88d
parent7d8874353e7eba22548b256f5ffb1e07bdb3c142 (diff)
downloadandroid_external_doclava-77cd5e5e5065038ab04a8dee21012d42a81458a4.tar.gz
android_external_doclava-77cd5e5e5065038ab04a8dee21012d42a81458a4.tar.bz2
android_external_doclava-77cd5e5e5065038ab04a8dee21012d42a81458a4.zip
Properly expose methods that override a non-hidden method in a hidden superclass in the API files.
Without this check, if a method overrides a non-hidden method in a hidden superclass, that method in the subclass would erronously be considered already "covered" by the hidden superclass, but the hidden superclass, and thus its methods, would not be shown in any of the API files. Change-Id: I416773be3aa3a8536684549011fa63b34f0d5251
-rw-r--r--src/com/google/doclava/Stubs.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/google/doclava/Stubs.java b/src/com/google/doclava/Stubs.java
index fa82802..efcf89b 100644
--- a/src/com/google/doclava/Stubs.java
+++ b/src/com/google/doclava/Stubs.java
@@ -745,7 +745,13 @@ public class Stubs {
if (!om.isAbstract()) {
// If the parent is hidden or removed, we can't rely on it to provide
// the API
- if (!om.isHiddenOrRemoved()) {
+ // TODO This check will false positive on cases of a method declared
+ // in a non-hidden class, overidden in a hidden class, and then overidden
+ // again in a non-hidden subclass of the hidden class
+ // (non-hidden->hidden->non-hidden), and will redundantly output a method
+ // entry for the non-hidden sub-subclass. Thankfully, this pattern tends
+ // to be quite rare.
+ if (!om.isHiddenOrRemoved() && !om.containingClass().isHiddenOrRemoved()) {
// If the only "override" turns out to be in our own class
// (which sometimes happens in concrete subclasses of
// abstract base classes), it's not really an override