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
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 @@
         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