]> source.dussan.org Git - aspectj.git/commitdiff
318884: incremental: parameterization change on field
authoraclement <aclement>
Mon, 5 Jul 2010 23:02:44 +0000 (23:02 +0000)
committeraclement <aclement>
Mon, 5 Jul 2010 23:02:44 +0000 (23:02 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java

index 60b3810e42423e2772456b5639e4f50dc4b7319a..9f3e873c414a57a7d68008134ae7371e8b2ace50 100644 (file)
@@ -1636,12 +1636,25 @@ public class AjState implements CompilerConfigurationChangeFlags {
                        char[] fieldName = field.getName();
                        for (int j = 0; j < existingFs.length; j++) {
                                if (CharOperation.equals(existingFs[j].getName(), fieldName)) {
-                                       if (!modifiersEqual(field.getModifiers(), existingFs[j].getModifiers())) {
+                                       IBinaryField existing = existingFs[j];
+                                       if (!modifiersEqual(field.getModifiers(), existing.getModifiers())) {
                                                return true;
                                        }
-                                       if (!CharOperation.equals(existingFs[j].getTypeName(), field.getTypeName())) {
+                                       if (!CharOperation.equals(existing.getTypeName(), field.getTypeName())) {
                                                return true;
                                        }
+
+                                       char[] existingGSig = existing.getGenericSignature();
+                                       char[] fieldGSig = field.getGenericSignature();
+                                       if ((existingGSig == null && fieldGSig != null) || (existingGSig != null && fieldGSig == null)) {
+                                               return true;
+                                       }
+                                       if (existingGSig != null) {
+                                               if (!CharOperation.equals(existingGSig, fieldGSig)) {
+                                                       return true;
+                                               }
+                                       }
+
                                        continue new_field_loop;
                                }
                        }