Fix overridden method check in apicheck.

In ClassInfo.isConsistent(), if an added method is implementing an
abstract method, we should fail, because the newly added method affects how
users use it.

Bug: 19914248
Change-Id: I5dc1f8892b775db79a85e53b4fc408b8455c55a8
diff --git a/src/com/google/doclava/ClassInfo.java b/src/com/google/doclava/ClassInfo.java
index 14cd99c..06ce1f0 100644
--- a/src/com/google/doclava/ClassInfo.java
+++ b/src/com/google/doclava/ClassInfo.java
@@ -2081,9 +2081,12 @@
         /*
          * Similarly to the above, do not fail if this "new" method is really an override of an
          * existing superclass method.
+         * But we should fail if this is overriding an abstract method, because method's
+         * abstractness affects how users use it. See also Stubs.methodIsOverride().
          */
         MethodInfo mi = ClassInfo.overriddenMethod(mInfo, this);
-        if (mi == null) {
+        if (mi == null ||
+            mi.isAbstract() != mInfo.isAbstract()) {
           Errors.error(Errors.ADDED_METHOD, mInfo.position(), "Added public method "
               + mInfo.qualifiedName());
           consistent = false;