Community
Participate
Working Groups
build 3.3RC4 Add the following test in org.eclipse.jdt.core.tests.model.ResolveTests. public void testONLY_Bug() throws CoreException, IOException { String jarName = "bug119434.jar"; try { String[] pathAndContents = new String[] { "test/p/Type.java", "package test.p;"+ "public class Type {\n" + "}\n" }; addLibrary(jarName, "bug119434_src.zip", pathAndContents, JavaCore.VERSION_1_4); this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Resolve/src/test/p/Type.java", "package test.p;"+ "public class Type {\n" + "}\n"); IJavaProject javaProject = this.getJavaProject("Resolve"); IType foundType = javaProject.findType("test.p", "Type", this.wcOwner); assertElementEquals( "Unexpected elements", "Type [in Type.class [in test.p [in bug119434.jar [in Resolve]]]]", foundType); } finally { removeLibraryEntry(this.currentProject, new Path(jarName)); deleteFile(new File(jarName)); } } 'Type [in Type.class [in test.p [in src [in Resolve]]]]' should be returned instead of 'Type [in Type.class [in test.p [in bug119434.jar [in Resolve]]]]' because 'src' is before 'bug119434.jar' on the classpath.
Created attachment 76036 [details] Test renamed and fixed with the correct expected type
Fix for bug 194399 actually fixes this bug. Test released in HEAD. *** This bug has been marked as a duplicate of bug 194399 ***
Verified for 3.4 M2 using build I20070917-0010.