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 33754 Details for
Bug 124469
[1.5][search] does not find references to enum type in binary annotation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to fix this issue
v00.txt (text/plain), 9.75 KB, created by
Frederic Fusier
on 2006-01-28 10:47:29 EST
(
hide
)
Description:
Patch to fix this issue
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-01-28 10:47:29 EST
Size:
9.75 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java,v >retrieving revision 1.60 >diff -u -r1.60 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 26 Jan 2006 22:00:12 -0000 1.60 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 28 Jan 2006 15:23:53 -0000 >@@ -47,7 +47,7 @@ > // org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true; > // TESTS_PREFIX = "testBug110336"; > // TESTS_NAMES = new String[] { "testBug120816a" }; >-// TESTS_NUMBERS = new int[] { 122442 }; >+ TESTS_NUMBERS = new int[] { 124469 }; > // TESTS_RANGE = new int[] { 83304, -1 }; > } > >@@ -5776,6 +5776,35 @@ > } > > /** >+ * Bug 124469: [search] AIOOBE in PatternLocator when searching for dependency extent from manifest >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124469" >+ */ >+public void testBug124469a() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "p1", "Enum.class").getType(); >+ search(type, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar p1.Enum p1.Annot.value() EXACT_MATCH\n" + >+ "lib/b124469.jar p1.Test EXACT_MATCH\n" + >+ "lib/b124469.jar p1.Test EXACT_MATCH" >+ ); >+} >+public void testBug124469b() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "p1", "Enum.class").getType(); >+ IField field = type.getField("TYPE"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar p1.Test EXACT_MATCH" >+ ); >+} >+public void testBug124469c() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "p1", "Annot.class").getType(); >+ search(type, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar p1.Test EXACT_MATCH" >+ ); >+} >+ >+/** > * Bug 125178: [search] AIOOBE in PatternLocator when searching for dependency extent from manifest > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=125178" > */ >Index: workspace/JavaSearchBugs/.classpath >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/workspace/JavaSearchBugs/.classpath,v >retrieving revision 1.8 >diff -u -r1.8 .classpath >--- workspace/JavaSearchBugs/.classpath 26 Jan 2006 22:00:12 -0000 1.8 >+++ workspace/JavaSearchBugs/.classpath 28 Jan 2006 15:23:53 -0000 >@@ -6,6 +6,7 @@ > <classpathentry kind="lib" path="lib/test75816.jar" sourcepath="/JavaSearchBugs/lib/test75816.jar" rootpath=""/> > <classpathentry kind="lib" path="lib/b87627.jar" sourcepath="/JavaSearchBugs/lib/b87627.jar" rootpath=""/> > <classpathentry kind="lib" path="lib/b110422.jar" sourcepath="" rootpath=""/> >+ <classpathentry kind="lib" path="lib/b124469.jar" sourcepath="/JavaSearchBugs/lib/b124469.jar" rootpath=""/> > <classpathentry kind="lib" path="lib/b125178.jar" sourcepath="" rootpath=""/> > <classpathentry kind="lib" path="lib/JavaSearch15.jar" sourcepath="/JavaSearchBugs/lib/JavaSearch15.jar" rootpath=""/> > <classpathentry sourcepath="lib" kind="lib" path="lib"/> >Index: workspace/JavaSearchBugs/lib/b124469.jar >=================================================================== >RCS file: workspace/JavaSearchBugs/lib/b124469.jar >diff -N workspace/JavaSearchBugs/lib/b124469.jar >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/JavaSearchBugs/lib/b124469.jar 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,20 @@ >+PKÔ<4META-INF/MANIFEST.MFþÊóMÌËLK-.Ñ >+K-*ÎÌϳR0Ô3àåâåPK²îPKÉ<4p1/Annot.classU?Í >+@ Ϧi?FíÛ n×" >+ Ð~ÅÆðïáZô=Tti1s/ç|÷ÌÜÏ÷õàa¡aÀ ?=w/DVjP¬×ÜM¹Üë= RGë^å >+ÊË8ílÔ§UÈ`ÚÎ ?¢zì(;å5¶sf0E'-í?C3fQæ±:fõÇøÒ"Èð³*ÂScÈ?llÃ@OÑQiC öÑ £ÙkCVY§Á0§{ëPKwÊî³ÁPKÉ<4 >+p1/Annot.java+HLÎNLOU(0´æåÁÒ¤Ìd̼Ԣ´ÄäTǼ¼ü j^.N×¼Ò\ ²ÄÒT >+M rN C8ç$+$H$Ñà¢Ì¼t b0 ¯ååPK)y¾û\PKÉ<4 >+p1/Enum.classuR]OÓP~κÑï? >+?u_M,0,^?Õ:KºKKäÞ?aâ½· 3ç½Åÿ ¾§làlÓsÞó÷}>zÎÏßßZ²Xb?÷²Ç¯Ë3îò¾hs§äÂÛÞ®Ê1ô6w6fÊkúN¡Ä ¼êÚæ >+Ûr,o AJkejÖxmFQ@Ø*0ÌÐoL¤õ]És-§+jåÕª ODq2¢Cºå~½jºÛ¼jT£7n¹ku?T a?X½·Ö>pÛ7)PÓZG¥nÈbîb?Ü÷̺¸Ef¹ëòC£±wÈ?éÖ¸UÝ5 >+/Wì* >+·r@¸õaª5Kû¸GZ^'3ñ´öo422´ËR=³#æ;Ûdq¼Ní¥éÎFѶͷ×Ü_7¯ðÞ0÷<«á(Çq<Ù+H¥9¥Ôð]Ã|n>DÅ%«æpÏw)Ô/_ ü çÜjlKtóB« qºÀð¤8[ÊiAü~Z={ô$ÏÀ*£ªÔÄÀ FÂßi%c¤t±/ã4*4àd"È?.Z,KTÎ̦¸Öiì£´Ô q=`NÐ;Ùn_&hÑ>q±ÊºiUòBÇüäÜÑ4v!!?Ûnc¬BæY?¡·|FÄ,U6Oqç÷?"2ô!tútþëóL?þÂR0>Ä£`~üPKÐ-ðIÏPKÉ<4p1/Enum.java+HLÎNLOU(0´æåÁÒ¤Ìd Ô¼Ò\WQÍËÅà >+¯ååPKä5þL,0PKÉ<4 >+p1/Test.class-OMKÃ@}Ó¤MV[ë÷ÇÅz0ô¬" >+AEKÀã6.uKºì¦ÿËàÁà?gÓìÂ̼÷fÞ0¿ß?F8 >+Ð £h*? >+à±Q&ô<z-dj k¥½!xgç Á¿Ëßd?hú±Òò¡\Îd1³Lq, r¸&}û®¡×ë®áK^©¼WNï8òÒ'?Úª¥è2ÇoµÎ°*×l:a?æJd¥¬}Ǻ\2çO_ƶÒ6qªÇ×Ï¥0&Y÷w?-×8÷?Æ1`Uh^|¡ýÉE!ÇVEúèrì8oTúfûp>amûÛØÁî{ØO¹>08üPKÎîPKÉ<4p1/Test.java+HLÎNLOU(0´æåâårpÌËË/Ñ(KÌ)MµuÍ+ÍÕpÕQÈÌ+ ê$ç$!ù:Å%Eyéa%%M^®Ò¤Ìd°¬BHjqB5/W-/PKq¬æ«]qPKÔ<4²îMETA-INF/MANIFEST.MFþÊPKÉ<4wÊî³Áap1/Annot.classPKÉ<4)y¾û\ >+^p1/Annot.javaPKÉ<4Ð-ðIÏ >+õp1/Enum.classPKÉ<4ä5þL,0yp1/Enum.javaPKÉ<4Îî >+ßp1/Test.classPKÉ<4q¬æ«]q9p1/Test.javaPK§Ð >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/index/DiskIndex.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java,v >retrieving revision 1.42 >diff -u -r1.42 DiskIndex.java >--- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 26 Jan 2006 15:31:04 -0000 1.42 >+++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 28 Jan 2006 15:23:57 -0000 >@@ -35,7 +35,7 @@ > private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet > private char[] cachedCategoryName; > >-public static final String SIGNATURE= "INDEX VERSION 1.107"; //$NON-NLS-1$ >+public static final String SIGNATURE= "INDEX VERSION 1.108"; //$NON-NLS-1$ > public static boolean DEBUG = false; > > private static final int RE_INDEXED = -1; >Index: search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java,v >retrieving revision 1.50 >diff -u -r1.50 BinaryIndexer.java >--- search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 25 Nov 2005 16:44:45 -0000 1.50 >+++ search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 28 Jan 2006 15:23:58 -0000 >@@ -14,11 +14,15 @@ > import org.eclipse.jdt.core.compiler.CharOperation; > import org.eclipse.jdt.core.search.SearchDocument; > import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; >+import org.eclipse.jdt.internal.compiler.classfmt.AnnotationInfo; > import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader; > import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException; >+import org.eclipse.jdt.internal.compiler.classfmt.ElementValuePairInfo; > import org.eclipse.jdt.internal.compiler.classfmt.FieldInfo; > import org.eclipse.jdt.internal.compiler.classfmt.MethodInfo; >+import org.eclipse.jdt.internal.compiler.env.ClassSignature; >+import org.eclipse.jdt.internal.compiler.env.EnumConstantSignature; > import org.eclipse.jdt.internal.compiler.util.SuffixConstants; > > public class BinaryIndexer extends AbstractIndexer implements SuffixConstants { >@@ -508,7 +512,33 @@ > addAnnotationTypeDeclaration(modifiers, packageName, name, enclosingTypeNames, false); > break; > } >- >+ >+ // Look for references in annotations >+ AnnotationInfo[] annotations = (AnnotationInfo[]) reader.getAnnotations(); >+ if (annotations != null) { >+ for (int i=0, aLength=annotations.length; i<aLength; i++) { >+ AnnotationInfo annotation = annotations[i]; >+ addTypeReference(replace('/', '.', Signature.toCharArray(annotation.getTypeName()))); >+ ElementValuePairInfo[] valuePairs = (ElementValuePairInfo[]) annotation.getElementValuePairs(); >+ if (valuePairs != null) { >+ for (int j=0, vpLength=valuePairs.length; j<vpLength; j++) { >+ ElementValuePairInfo valuePair = valuePairs[j]; >+ addMethodReference(valuePair.getName(), 0); >+ Object pairValue = valuePair.getValue(); >+ if (pairValue instanceof EnumConstantSignature) { >+ EnumConstantSignature enumConstant = (EnumConstantSignature) pairValue; >+ addTypeReference(replace('/', '.', Signature.toCharArray(enumConstant.getTypeName()))); >+ addNameReference(enumConstant.getEnumConstantName()); >+ } else if (pairValue instanceof ClassSignature) { >+ ClassSignature classConstant = (ClassSignature) pairValue; >+ addTypeReference(replace('/', '.', Signature.toCharArray(classConstant.getTypeName()))); >+ } >+ } >+ } >+ } >+ } >+ >+ > // first reference all methods declarations and field declarations > MethodInfo[] methods = (MethodInfo[]) reader.getMethods(); > if (methods != null) {
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 124469
:
33754
|
34062
|
34063
|
34763