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 121159 Details for
Bug 149768
Annotations should be a compilation dependency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch.txt (text/plain), 3.55 KB, created by
Kent Johnson
on 2008-12-23 12:15:08 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2008-12-23 12:15:08 EST
Size:
3.55 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java,v >retrieving revision 1.86 >diff -u -r1.86 ClassFileReader.java >--- compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java 27 Jun 2008 16:04:13 -0000 1.86 >+++ compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java 23 Dec 2008 17:13:27 -0000 >@@ -806,6 +806,9 @@ > // meta-annotations > if ((getTagBits() & OnlyStructuralTagBits) != (newClassFile.getTagBits() & OnlyStructuralTagBits)) > return true; >+ // annotations >+ if (hasStructuralAnnotationChanges(getAnnotations(), newClassFile.getAnnotations())) >+ return true; > > // generic signature > if (!CharOperation.equals(getGenericSignature(), newClassFile.getGenericSignature())) >@@ -923,6 +926,33 @@ > } > } > >+private boolean hasStructuralAnnotationChanges(IBinaryAnnotation[] currentAnnotations, IBinaryAnnotation[] otherAnnotations) { >+ if (currentAnnotations == otherAnnotations) >+ return false; >+ >+ int currentAnnotationsLength = currentAnnotations == null ? 0 : currentAnnotations.length; >+ int otherAnnotationsLength = otherAnnotations == null ? 0 : otherAnnotations.length; >+ if (currentAnnotationsLength != otherAnnotationsLength) >+ return true; >+ for (int i = 0; i < currentAnnotationsLength; i++) { >+ if (!CharOperation.equals(currentAnnotations[i].getTypeName(), otherAnnotations[i].getTypeName())) >+ return true; >+ IBinaryElementValuePair[] currentPairs = currentAnnotations[i].getElementValuePairs(); >+ IBinaryElementValuePair[] otherPairs = otherAnnotations[i].getElementValuePairs(); >+ int currentPairsLength = currentPairs == null ? 0 : currentPairs.length; >+ int otherPairsLength = otherPairs == null ? 0 : otherPairs.length; >+ if (currentPairsLength != otherPairsLength) >+ return true; >+ for (int j = 0; j < currentPairsLength; j++) { >+ if (!CharOperation.equals(currentPairs[j].getName(), otherPairs[j].getName())) >+ return true; >+ if (!currentPairs[j].getValue().equals(otherPairs[j].getValue())) >+ return true; >+ } >+ } >+ return false; >+} >+ > private boolean hasStructuralFieldChanges(FieldInfo currentFieldInfo, FieldInfo otherFieldInfo) { > // generic signature > if (!CharOperation.equals(currentFieldInfo.getGenericSignature(), otherFieldInfo.getGenericSignature())) >@@ -931,6 +961,8 @@ > return true; > if ((currentFieldInfo.getTagBits() & TagBits.AnnotationDeprecated) != (otherFieldInfo.getTagBits() & TagBits.AnnotationDeprecated)) > return true; >+ if (hasStructuralAnnotationChanges(currentFieldInfo.getAnnotations(), otherFieldInfo.getAnnotations())) >+ return true; > if (!CharOperation.equals(currentFieldInfo.getName(), otherFieldInfo.getName())) > return true; > if (!CharOperation.equals(currentFieldInfo.getTypeName(), otherFieldInfo.getTypeName())) >@@ -976,6 +1008,8 @@ > return true; > if ((currentMethodInfo.getTagBits() & TagBits.AnnotationDeprecated) != (otherMethodInfo.getTagBits() & TagBits.AnnotationDeprecated)) > return true; >+ if (hasStructuralAnnotationChanges(currentMethodInfo.getAnnotations(), otherMethodInfo.getAnnotations())) >+ return true; > if (!CharOperation.equals(currentMethodInfo.getSelector(), otherMethodInfo.getSelector())) > return true; > if (!CharOperation.equals(currentMethodInfo.getMethodDescriptor(), otherMethodInfo.getMethodDescriptor()))
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
Actions:
View
|
Diff
Attachments on
bug 149768
:
121111
| 121159 |
121479