Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 35757 Details for
Bug 129163
full build occurs when only class file change
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch containing fix to AjState
pr129163-ajdt-patch-ajstate.txt (text/plain), 5.85 KB, created by
Helen Beeken
on 2006-03-06 08:35:16 EST
(
hide
)
Description:
patch containing fix to AjState
Filename:
MIME Type:
Creator:
Helen Beeken
Created:
2006-03-06 08:35:16 EST
Size:
5.85 KB
patch
obsolete
>Index: src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java >=================================================================== >RCS file: /home/technology/org.aspectj/modules/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java,v >retrieving revision 1.49 >diff -u -r1.49 EclipseSourceType.java >--- src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java 22 Feb 2006 15:27:39 -0000 1.49 >+++ src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java 6 Mar 2006 13:36:07 -0000 >@@ -226,11 +226,21 @@ > return resolvedPointcutDeclaration; > } > >+ /** >+ * This method may not return all fields, for example it may >+ * not include the ajc$initFailureCause or ajc$perSingletonInstance >+ * fields - see bug 129613 >+ */ > public ResolvedMember[] getDeclaredFields() { > if (declaredFields == null) fillDeclaredMembers(); > return declaredFields; > } > >+ /** >+ * This method may not return all methods, for example it may >+ * not include clinit, aspectOf, hasAspect or ajc$postClinit >+ * methods - see bug 129613 >+ */ > public ResolvedMember[] getDeclaredMethods() { > if (declaredMethods == null) fillDeclaredMembers(); > return declaredMethods; >Index: src/org/aspectj/ajdt/internal/core/builder/AjState.java >=================================================================== >RCS file: /home/technology/org.aspectj/modules/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java,v >retrieving revision 1.24 >diff -u -r1.24 AjState.java >--- src/org/aspectj/ajdt/internal/core/builder/AjState.java 24 Feb 2006 15:00:18 -0000 1.24 >+++ src/org/aspectj/ajdt/internal/core/builder/AjState.java 6 Mar 2006 13:36:08 -0000 >@@ -846,17 +846,29 @@ > MemberStructure[] existingFields = existingType.fields; > IBinaryField[] newFields = reader.getFields(); > if (newFields == null) { newFields = new IBinaryField[0]; } >- if (newFields.length != existingFields.length) { >+ // remove any ajc$XXX fields from those we compare with >+ // the existing fields - bug 129163 >+ List nonGenFields = new ArrayList(); >+ for (int i = 0; i < newFields.length; i++) { >+ IBinaryField field = newFields[i]; >+ char[] name = field.getName(); >+ char[] ajc = {'a', 'j', 'c','$'}; >+ if (!startsWtih(name,ajc)) { >+ nonGenFields.add(field); >+ } >+ } >+ if (nonGenFields.size() != existingFields.length) { > return true; > } >- new_field_loop: for (int i = 0; i < newFields.length; i++) { >- char[] fieldName = newFields[i].getName(); >+ new_field_loop: for (Iterator iter = nonGenFields.iterator(); iter.hasNext();) { >+ IBinaryField field = (IBinaryField) iter.next(); >+ char[] fieldName = field.getName(); > for (int j = 0; j < existingFields.length; j++) { > if (equal(existingFields[j].name,fieldName)) { >- if (!modifiersEqual(newFields[i].getModifiers(),existingFields[j].modifiers)) { >+ if (!modifiersEqual(field.getModifiers(),existingFields[j].modifiers)) { > return true; > } >- if (!equal(existingFields[j].signature,newFields[i].getTypeName())) { >+ if (!equal(existingFields[j].signature,field.getTypeName())) { > return true; > } > continue new_field_loop; >@@ -869,20 +881,38 @@ > MemberStructure[] existingMethods = existingType.methods; > IBinaryMethod[] newMethods = reader.getMethods(); > if (newMethods == null) { newMethods = new IBinaryMethod[0]; } >- if (newMethods.length != existingMethods.length) { >+ // remove the aspectOf, hasAspect, clinit and ajc$XXX methods >+ // from those we compare with the existing methods - bug 129163 >+ List nonGenMethods = new ArrayList(); >+ for (int i = 0; i < newMethods.length; i++) { >+ IBinaryMethod method = newMethods[i]; >+ char[] methodName = method.getSelector(); >+ char[] aspectOf = {'a', 's', 'p','e','c','t','O','f'}; >+ char[] hasAspect = {'h', 'a', 's','A','s','p','e','c','t'}; >+ char[] clinit = {'<', 'c', 'l','i','n','i','t','>'}; >+ char[] ajc = {'a', 'j', 'c','$'}; >+ if (!equal(methodName,aspectOf) >+ && !equal(methodName,hasAspect) >+ && !equal(methodName,clinit) >+ && !startsWtih(methodName,ajc)) { >+ nonGenMethods.add(method); >+ } >+ } >+ if (nonGenMethods.size() != existingMethods.length) { > return true; > } >- new_method_loop: for (int i = 0; i < newMethods.length; i++) { >- char[] methodName = newMethods[i].getSelector(); >+ new_method_loop: for (Iterator iter = nonGenMethods.iterator(); iter.hasNext();) { >+ IBinaryMethod method = (IBinaryMethod) iter.next(); >+ char[] methodName = method.getSelector(); > for (int j = 0; j < existingMethods.length; j++) { > if (equal(existingMethods[j].name,methodName)) { > // candidate match >- if (!equal(newMethods[i].getMethodDescriptor(),existingMethods[j].signature)) { >+ if (!equal(method.getMethodDescriptor(),existingMethods[j].signature)) { > continue; // might be overloading > } > else { > // matching sigs >- if (!modifiersEqual(newMethods[i].getModifiers(),existingMethods[j].modifiers)) { >+ if (!modifiersEqual(method.getModifiers(),existingMethods[j].modifiers)) { > return true; > } > continue new_method_loop; >@@ -920,6 +950,22 @@ > return true; > } > >+ private boolean startsWtih(char[] fullCharArray, char[] startingChars) { >+ if (fullCharArray == null && startingChars == null) { >+ return true; >+ } >+ if (fullCharArray == null || startingChars == null) { >+ return false; >+ } >+ if (fullCharArray.length < startingChars.length) { >+ return false; >+ } >+ for (int i = 0; i < startingChars.length; i++) { >+ if (fullCharArray[i] != startingChars[i]) return false; >+ } >+ return true; >+ } >+ > private static StringSet makeStringSet(List strings) { > StringSet ret = new StringSet(strings.size()); > for (Iterator iter = strings.iterator(); iter.hasNext();) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
aclement
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 129163
:
35752
|
35754
| 35757 |
35759
|
35826
|
35841
|
35899
|
35905
|
35906
|
36053