diff options
author | C. Sean Young <csyoung@google.com> | 2015-05-20 12:13:27 -0500 |
---|---|---|
committer | C. Sean Young <csyoung@google.com> | 2015-05-20 12:13:27 -0500 |
commit | 13f355933840a395d671afcc548e2ae4020d92ef (patch) | |
tree | cfbe3721796d1710e068436a572bb0dc17fcfeb5 /src/com/google | |
parent | 44ad94c02ee045773c07c33b73fed8f56a782f30 (diff) | |
parent | 552b5f6628ed74d95e87e2a72e5d1a0aaa926fda (diff) | |
download | android_external_doclava-13f355933840a395d671afcc548e2ae4020d92ef.tar.gz android_external_doclava-13f355933840a395d671afcc548e2ae4020d92ef.tar.bz2 android_external_doclava-13f355933840a395d671afcc548e2ae4020d92ef.zip |
resolved conflicts for merge of 552b5f66 to mnc-dev
Change-Id: I1dfe65d9cccf3d0aae7800215cf8f5e66a0d7347
Diffstat (limited to 'src/com/google')
-rw-r--r-- | src/com/google/doclava/ClassInfo.java | 10 | ||||
-rw-r--r-- | src/com/google/doclava/FieldInfo.java | 4 | ||||
-rw-r--r-- | src/com/google/doclava/MethodInfo.java | 51 |
3 files changed, 38 insertions, 27 deletions
diff --git a/src/com/google/doclava/ClassInfo.java b/src/com/google/doclava/ClassInfo.java index 374b7b6..8f0199e 100644 --- a/src/com/google/doclava/ClassInfo.java +++ b/src/com/google/doclava/ClassInfo.java @@ -2087,7 +2087,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco } if (mi == null) { Errors.error(Errors.REMOVED_METHOD, mInfo.position(), "Removed public method " - + mInfo.qualifiedName()); + + mInfo.prettyQualifiedSignature()); consistent = false; } } @@ -2104,7 +2104,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco if (mi == null || mi.isAbstract() != mInfo.isAbstract()) { Errors.error(Errors.ADDED_METHOD, mInfo.position(), "Added public method " - + mInfo.qualifiedName()); + + mInfo.prettyQualifiedSignature()); if (diffMode) { newMethods.add(mInfo); } @@ -2123,14 +2123,14 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco } } else { Errors.error(Errors.REMOVED_METHOD, mInfo.position(), "Removed public constructor " - + mInfo.prettySignature()); + + mInfo.prettyQualifiedSignature()); consistent = false; } } for (MethodInfo mInfo : cl.mApiCheckConstructors.values()) { if (!mApiCheckConstructors.containsKey(mInfo.getHashableName())) { Errors.error(Errors.ADDED_METHOD, mInfo.position(), "Added public constructor " - + mInfo.prettySignature()); + + mInfo.prettyQualifiedSignature()); if (diffMode) { newCtors.add(mInfo); } @@ -2221,7 +2221,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco if (!isDeprecated() == cl.isDeprecated()) { consistent = false; Errors.error(Errors.CHANGED_DEPRECATED, cl.position(), "Class " + cl.qualifiedName() - + " has changed deprecation state"); + + " has changed deprecation state " + isDeprecated() + " --> " + cl.isDeprecated()); } if (superclassName() != null) { // java.lang.Object can't have a superclass. diff --git a/src/com/google/doclava/FieldInfo.java b/src/com/google/doclava/FieldInfo.java index ce80e9e..83d748a 100644 --- a/src/com/google/doclava/FieldInfo.java +++ b/src/com/google/doclava/FieldInfo.java @@ -423,7 +423,7 @@ public class FieldInfo extends MemberInfo { boolean consistent = true; if (!mType.equals(fInfo.mType)) { Errors.error(Errors.CHANGED_TYPE, fInfo.position(), "Field " + fInfo.qualifiedName() - + " has changed type"); + + " has changed type from " + mType + " to " + fInfo.mType); consistent = false; } else if (!this.valueEquals(fInfo)) { Errors.error(Errors.CHANGED_VALUE, fInfo.position(), "Field " + fInfo.qualifiedName() @@ -467,7 +467,7 @@ public class FieldInfo extends MemberInfo { if (isDeprecated() != fInfo.isDeprecated()) { Errors.error(Errors.CHANGED_DEPRECATED, fInfo.position(), "Field " + fInfo.qualifiedName() - + " has changed deprecation state"); + + " has changed deprecation state " + isDeprecated() + " --> " + fInfo.isDeprecated()); consistent = false; } diff --git a/src/com/google/doclava/MethodInfo.java b/src/com/google/doclava/MethodInfo.java index cf98d0f..5dc217c 100644 --- a/src/com/google/doclava/MethodInfo.java +++ b/src/com/google/doclava/MethodInfo.java @@ -333,6 +333,10 @@ public class MethodInfo extends MemberInfo implements AbstractMethodInfo, Resolv public String prettySignature() { return name() + prettyParameters(); } + + public String prettyQualifiedSignature() { + return qualifiedName() + prettyParameters(); + } /** * Returns a printable version of the parameters of this method's signature. @@ -728,6 +732,8 @@ public class MethodInfo extends MemberInfo implements AbstractMethodInfo, Resolv public String qualifiedName() { String parentQName = (containingClass() != null) ? (containingClass().qualifiedName() + ".") : ""; + // TODO: This logic doesn't work well with constructors, as name() for constructors already + // contains the containingClass's name, leading to things like A.B.B() being rendered as A.B.A.B() return parentQName + name(); } @@ -776,21 +782,22 @@ public class MethodInfo extends MemberInfo implements AbstractMethodInfo, Resolv } if (!consistent) { - Errors.error(Errors.CHANGED_TYPE, mInfo.position(), "Method " + mInfo.qualifiedName() - + " has changed return type from " + mReturnType + " to " + mInfo.mReturnType); + Errors.error(Errors.CHANGED_TYPE, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " has changed return type from " + mReturnType + + " to " + mInfo.mReturnType); } } if (mIsAbstract != mInfo.mIsAbstract) { consistent = false; - Errors.error(Errors.CHANGED_ABSTRACT, mInfo.position(), "Method " + mInfo.qualifiedName() - + " has changed 'abstract' qualifier"); + Errors.error(Errors.CHANGED_ABSTRACT, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " has changed 'abstract' qualifier"); } if (mIsNative != mInfo.mIsNative) { consistent = false; - Errors.error(Errors.CHANGED_NATIVE, mInfo.position(), "Method " + mInfo.qualifiedName() - + " has changed 'native' qualifier"); + Errors.error(Errors.CHANGED_NATIVE, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " has changed 'native' qualifier"); } if (!mIsStatic) { @@ -800,30 +807,32 @@ public class MethodInfo extends MemberInfo implements AbstractMethodInfo, Resolv // and (b) the method is not already inferred to be 'final' by virtue of its class. if (!isEffectivelyFinal() && mInfo.isEffectivelyFinal()) { consistent = false; - Errors.error(Errors.ADDED_FINAL, mInfo.position(), "Method " + mInfo.qualifiedName() - + " has added 'final' qualifier"); + Errors.error(Errors.ADDED_FINAL, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " has added 'final' qualifier"); } else if (isEffectivelyFinal() && !mInfo.isEffectivelyFinal()) { consistent = false; - Errors.error(Errors.REMOVED_FINAL, mInfo.position(), "Method " + mInfo.qualifiedName() - + " has removed 'final' qualifier"); + Errors.error(Errors.REMOVED_FINAL, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " has removed 'final' qualifier"); } } if (mIsStatic != mInfo.mIsStatic) { consistent = false; - Errors.error(Errors.CHANGED_STATIC, mInfo.position(), "Method " + mInfo.qualifiedName() - + " has changed 'static' qualifier"); + Errors.error(Errors.CHANGED_STATIC, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " has changed 'static' qualifier"); } if (!scope().equals(mInfo.scope())) { consistent = false; - Errors.error(Errors.CHANGED_SCOPE, mInfo.position(), "Method " + mInfo.qualifiedName() - + " changed scope from " + scope() + " to " + mInfo.scope()); + Errors.error(Errors.CHANGED_SCOPE, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " changed scope from " + scope() + + " to " + mInfo.scope()); } if (!isDeprecated() == mInfo.isDeprecated()) { - Errors.error(Errors.CHANGED_DEPRECATED, mInfo.position(), "Method " + mInfo.qualifiedName() - + " has changed deprecation state " + isDeprecated() + " --> " + mInfo.isDeprecated()); + Errors.error(Errors.CHANGED_DEPRECATED, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " has changed deprecation state " + isDeprecated() + + " --> " + mInfo.isDeprecated()); consistent = false; } @@ -842,8 +851,9 @@ public class MethodInfo extends MemberInfo implements AbstractMethodInfo, Resolv if (!mInfo.throwsException(exception)) { // exclude 'throws' changes to finalize() overrides with no arguments if (!name().equals("finalize") || (!mParameters.isEmpty())) { - Errors.error(Errors.CHANGED_THROWS, mInfo.position(), "Method " + mInfo.qualifiedName() - + " no longer throws exception " + exception.qualifiedName()); + Errors.error(Errors.CHANGED_THROWS, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " no longer throws exception " + + exception.qualifiedName()); consistent = false; } } @@ -853,8 +863,9 @@ public class MethodInfo extends MemberInfo implements AbstractMethodInfo, Resolv // exclude 'throws' changes to finalize() overrides with no arguments if (!throwsException(exec)) { if (!name().equals("finalize") || (!mParameters.isEmpty())) { - Errors.error(Errors.CHANGED_THROWS, mInfo.position(), "Method " + mInfo.qualifiedName() - + " added thrown exception " + exec.qualifiedName()); + Errors.error(Errors.CHANGED_THROWS, mInfo.position(), "Method " + + mInfo.prettyQualifiedSignature() + " added thrown exception " + + exec.qualifiedName()); consistent = false; } } |