aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-01-10 09:21:25 -0800
committerAndy Clement <aclement@gopivotal.com>2014-01-10 09:21:25 -0800
commit3030eb6cfde33d57de3fb28220defa91deb6cfe1 (patch)
treef21c3ed0dc1fd7d7ce1e00da5272a5d2058f722f
parent672b4327cc39cb05b4f81c8dd2db096540114099 (diff)
downloadaspectj-3030eb6cfde33d57de3fb28220defa91deb6cfe1.tar.gz
aspectj-3030eb6cfde33d57de3fb28220defa91deb6cfe1.zip
pr422943: tweak to avoid npe
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
index 76f6de5f5..965e87732 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
@@ -1826,13 +1826,13 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
// generic signature
if (!CharOperation.equals(reader.getGenericSignature(), existingType.genericSignature)) {
- logAnalysis(filename,"generic signature changed. old="+new String(existingType.genericSignature)+" new="+new String(reader.getGenericSignature()));
+ logAnalysis(filename,"generic signature changed. old="+stringify(existingType.genericSignature)+" new="+stringify(reader.getGenericSignature()));
return true;
}
// superclass name
if (!CharOperation.equals(reader.getSuperclassName(), existingType.superclassName)) {
- logAnalysis(filename,"superclass name changed. old="+new String(existingType.superclassName)+" new="+new String(reader.getSuperclassName()));
+ logAnalysis(filename,"superclass name changed. old="+stringify(existingType.superclassName)+" new="+stringify(reader.getSuperclassName()));
return true;
}
@@ -2052,7 +2052,8 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
}
// TODO missing a return true here? Meaning we have a field in the new that we can't find in the old!
}
-
+
+ logAnalysis(filename,"method changed. New method detected '"+stringify(method)+"' (might be a rename)");
return true; // (no match found)
}
@@ -2083,6 +2084,13 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
return false;
}
+ private String stringify(char[] chars) {
+ if (chars == null) {
+ return "null";
+ }
+ return new String(chars);
+ }
+
private String stringify(IBinaryNestedType[] binaryNestedTypes) {
StringBuilder buf = new StringBuilder();
for (IBinaryNestedType binaryNestedType: binaryNestedTypes) {