View | Details | Raw Unified | Return to bug 124469 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java (-1 / +30 lines)
Lines 47-53 Link Here
47
//	org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true;
47
//	org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true;
48
//	TESTS_PREFIX =  "testBug110336";
48
//	TESTS_PREFIX =  "testBug110336";
49
//	TESTS_NAMES = new String[] { "testBug120816a" };
49
//	TESTS_NAMES = new String[] { "testBug120816a" };
50
//	TESTS_NUMBERS = new int[] { 122442 };
50
	TESTS_NUMBERS = new int[] { 124469 };
51
//	TESTS_RANGE = new int[] { 83304, -1 };
51
//	TESTS_RANGE = new int[] { 83304, -1 };
52
	}
52
	}
53
53
Lines 5776-5781 Link Here
5776
}
5776
}
5777
5777
5778
/**
5778
/**
5779
 * Bug 124469: [search] AIOOBE in PatternLocator when searching for dependency extent from manifest
5780
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124469"
5781
 */
5782
public void testBug124469a() throws CoreException {
5783
	IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "p1", "Enum.class").getType();
5784
	search(type, REFERENCES);
5785
	assertSearchResults(
5786
		"lib/b124469.jar p1.Enum p1.Annot.value() EXACT_MATCH\n" + 
5787
		"lib/b124469.jar p1.Test EXACT_MATCH\n" + 
5788
		"lib/b124469.jar p1.Test EXACT_MATCH"
5789
	);
5790
}
5791
public void testBug124469b() throws CoreException {
5792
	IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "p1", "Enum.class").getType();
5793
	IField field = type.getField("TYPE");
5794
	search(field, REFERENCES);
5795
	assertSearchResults(
5796
		"lib/b124469.jar p1.Test EXACT_MATCH"
5797
	);
5798
}
5799
public void testBug124469c() throws CoreException {
5800
	IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "p1", "Annot.class").getType();
5801
	search(type, REFERENCES);
5802
	assertSearchResults(
5803
		"lib/b124469.jar p1.Test EXACT_MATCH"
5804
	);
5805
}
5806
5807
/**
5779
 * Bug 125178: [search] AIOOBE in PatternLocator when searching for dependency extent from manifest
5808
 * Bug 125178: [search] AIOOBE in PatternLocator when searching for dependency extent from manifest
5780
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=125178"
5809
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=125178"
5781
 */
5810
 */
(-)workspace/JavaSearchBugs/.classpath (+1 lines)
Lines 6-11 Link Here
6
	<classpathentry kind="lib" path="lib/test75816.jar" sourcepath="/JavaSearchBugs/lib/test75816.jar" rootpath=""/>
6
	<classpathentry kind="lib" path="lib/test75816.jar" sourcepath="/JavaSearchBugs/lib/test75816.jar" rootpath=""/>
7
	<classpathentry kind="lib" path="lib/b87627.jar" sourcepath="/JavaSearchBugs/lib/b87627.jar" rootpath=""/>
7
	<classpathentry kind="lib" path="lib/b87627.jar" sourcepath="/JavaSearchBugs/lib/b87627.jar" rootpath=""/>
8
	<classpathentry kind="lib" path="lib/b110422.jar" sourcepath="" rootpath=""/>
8
	<classpathentry kind="lib" path="lib/b110422.jar" sourcepath="" rootpath=""/>
9
	<classpathentry kind="lib" path="lib/b124469.jar" sourcepath="/JavaSearchBugs/lib/b124469.jar" rootpath=""/>
9
	<classpathentry kind="lib" path="lib/b125178.jar" sourcepath="" rootpath=""/>
10
	<classpathentry kind="lib" path="lib/b125178.jar" sourcepath="" rootpath=""/>
10
	<classpathentry kind="lib" path="lib/JavaSearch15.jar" sourcepath="/JavaSearchBugs/lib/JavaSearch15.jar" rootpath=""/>
11
	<classpathentry kind="lib" path="lib/JavaSearch15.jar" sourcepath="/JavaSearchBugs/lib/JavaSearch15.jar" rootpath=""/>
11
	<classpathentry sourcepath="lib" kind="lib" path="lib"/>
12
	<classpathentry sourcepath="lib" kind="lib" path="lib"/>
(-)workspace/JavaSearchBugs/lib/b124469.jar (+20 lines)
Added Link Here
1
PKԀ<4META-INF/MANIFEST.MFþÊóMÌËLK-.Ñ
2
K-*ÎÌϳR0Ô3àåâåPK²îPKɀ<4p1/Annot.classU?Í
3
‚@…Ï”¦i?Fíۅn×­"
4
‚ …Ð~ÅÆðïáZô=Tti1s/ç|÷ÌÜÏ÷õàa¡aÀ ?=w/DVjP¬„×ÜM¹ˆÜë=	RGë^å
5
ÊË8í”lԚ§UÈ`Ú΅?¢zì(;å­5†¶sf0‚”E'-‰íƒ?C3fQ汈:fõÇøÒ"Èð³*ÂSœcÈ?llÃ@OÑQiC…öÑ £ÙkCVY§˜Á0§{ëPKwÊî³ÁPKɀ<4
6
p1/Annot.java+HLÎNLOU(0´æåÁ‚Ò¤œÌd‡Ì¼’Ô¢´ÄäTǼ¼ü…j^.N×¼Ò\…²ÄœÒT
7
M rN  Cˆ8ç$+$ƒH$Ñà’¢Ì¼t…b0…¯ååPK)y¾û\PKɀ<4
8
p1/Enum.classuR]OÓP~κѭ”ï?Ž
9
?u_•›M„˜™,0,™^?Õ:KºKKäÞ?aâ½·	3ç½Åÿ ¾§™làlÓsÞóž÷}>zÎÏßßZ²X–b?÷²‹Ç¯Ë3îò¾hs§äÂە†˜Þ®Ê1ô6w6fÊkúN¡Ä ¼êڊæ
10
Ûr,o…AJkejÖxmFQ@Ø*†0ÌЗo—L¤õ]És-§–+jåՎªˆ ODq2¢Cºå˜›~½jºÛ¼j›T£7n—¹k‰u?T a?X½·Ö>pÛ7)PÓZG¥‚nȘbîb?Ü÷̺Š›¸Ef¹ëòC£±wÈ?éÖ¸UÝ5
11
/Wì‘*
12
·r@¸õ†aª‡5­K̊»¸GZ^'3ñ´öo‡‚422´ËRƒ=³˜#‹æ;ŸÛdq¼‡Ní¥Œ†éÎFѶͷ×ܚ_7¯ðÞ0÷<«á(˜Çq<Ù+H¥“9¥Ôð]Ã|n‰>DÅ%«æpÏw)ŸÔ/_ ü…ç•Üj–lKtóB«	qºÀð¤8[ʄiŒAü–~Z={ô$ÏÀ*£ªÔÄÀ	FÂßi%c¤t‚±/ã4*4ƒàd"Ȋ?.Z,K”‚TÎ̦š¸Öi죴›Ô –q=`NÐ;Ùn_&hÑ>qŒ±Êº”iUòBdž”üŠäÜÑ4v!!?ۘnc¬B˜æY?¡·ž|FœÄ,U6Oqç÷?"2ô!tžútþëó•L‹?þÂR0>Ä£`~üPKÐ-ðIÏPKɀ<4p1/Enum.java+HLÎNLOU(0´æåÁ‚Ò¤œÌd…Ô¼Ò\WQÍËÅà
13
”¯ååPKä5þL,0PKɀ<4
14
p1/Test.class-OMKÃ@}Ó¤M›V[ë÷Çśz0ô¬"
15
AEKÀã6.uKº‘ì¦ÿ˓àÁà?gÓìÂ̼÷fÞ0¿ß?F8
16
Ð £h*?
17
à±Q&ô<zœ-dj	­k¥•½!xgç	Á¿Ëßd?šhú±Òò¡\Îd1³L†qžŠ,…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ÈÌ+	‹ê$ç$‡!€ù:Å%E™yéa%%M^®‚Ò¤œÌd°¬BHjq‰B5/W-/PKq¬æ«]qPKԀ<4²îMETA-INF/MANIFEST.MFþÊPKɀ<4wÊî³Áap1/Annot.classPKɀ<4)y¾û\
18
^p1/Annot.javaPKɀ<4Ð-ðIÏ
19
õp1/Enum.classPKɀ<4ä5þL,0yp1/Enum.javaPKɀ<4Îî‰
20
ßp1/Test.classPKɀ<4q¬æ«]q9p1/Test.javaPK§Ð
(-)search/org/eclipse/jdt/internal/core/index/DiskIndex.java (-1 / +1 lines)
Lines 35-41 Link Here
35
private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet
35
private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet
36
private char[] cachedCategoryName;
36
private char[] cachedCategoryName;
37
37
38
public static final String SIGNATURE= "INDEX VERSION 1.107"; //$NON-NLS-1$
38
public static final String SIGNATURE= "INDEX VERSION 1.108"; //$NON-NLS-1$
39
public static boolean DEBUG = false;
39
public static boolean DEBUG = false;
40
40
41
private static final int RE_INDEXED = -1;
41
private static final int RE_INDEXED = -1;
(-)search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java (-1 / +31 lines)
Lines 14-24 Link Here
14
import org.eclipse.jdt.core.compiler.CharOperation;
14
import org.eclipse.jdt.core.compiler.CharOperation;
15
import org.eclipse.jdt.core.search.SearchDocument;
15
import org.eclipse.jdt.core.search.SearchDocument;
16
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
16
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
17
import org.eclipse.jdt.internal.compiler.classfmt.AnnotationInfo;
17
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
18
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
18
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
19
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
19
import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
20
import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
21
import org.eclipse.jdt.internal.compiler.classfmt.ElementValuePairInfo;
20
import org.eclipse.jdt.internal.compiler.classfmt.FieldInfo;
22
import org.eclipse.jdt.internal.compiler.classfmt.FieldInfo;
21
import org.eclipse.jdt.internal.compiler.classfmt.MethodInfo;
23
import org.eclipse.jdt.internal.compiler.classfmt.MethodInfo;
24
import org.eclipse.jdt.internal.compiler.env.ClassSignature;
25
import org.eclipse.jdt.internal.compiler.env.EnumConstantSignature;
22
import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
26
import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
23
27
24
public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
28
public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
Lines 508-514 Link Here
508
					addAnnotationTypeDeclaration(modifiers, packageName, name, enclosingTypeNames, false);
512
					addAnnotationTypeDeclaration(modifiers, packageName, name, enclosingTypeNames, false);
509
					break;
513
					break;
510
			}			
514
			}			
511
	
515
516
			// Look for references in annotations
517
			AnnotationInfo[] annotations = (AnnotationInfo[]) reader.getAnnotations();
518
			if (annotations != null) {
519
				for (int i=0, aLength=annotations.length; i<aLength; i++) {
520
					AnnotationInfo annotation = annotations[i];
521
					addTypeReference(replace('/', '.', Signature.toCharArray(annotation.getTypeName())));
522
					ElementValuePairInfo[] valuePairs = (ElementValuePairInfo[]) annotation.getElementValuePairs();
523
					if (valuePairs != null) {
524
						for (int j=0, vpLength=valuePairs.length; j<vpLength; j++) {
525
							ElementValuePairInfo valuePair = valuePairs[j];
526
							addMethodReference(valuePair.getName(), 0);
527
							Object pairValue = valuePair.getValue();
528
							if (pairValue instanceof EnumConstantSignature) {
529
								EnumConstantSignature enumConstant = (EnumConstantSignature) pairValue;
530
								addTypeReference(replace('/', '.', Signature.toCharArray(enumConstant.getTypeName())));
531
								addNameReference(enumConstant.getEnumConstantName());
532
							} else if (pairValue instanceof ClassSignature) {
533
								ClassSignature classConstant = (ClassSignature) pairValue;
534
								addTypeReference(replace('/', '.', Signature.toCharArray(classConstant.getTypeName())));
535
							}
536
						}
537
					}
538
				}
539
			}
540
541
512
			// first reference all methods declarations and field declarations
542
			// first reference all methods declarations and field declarations
513
			MethodInfo[] methods = (MethodInfo[]) reader.getMethods();
543
			MethodInfo[] methods = (MethodInfo[]) reader.getMethods();
514
			if (methods != null) {
544
			if (methods != null) {

Return to bug 124469