Community
Participate
Working Groups
JDT Core HEAD Steps to reproduce: - Create a simple test project "Bar" with a package "p" and a type "Type" - Export the package "p" into a JAR file - Create another test project "Foo" and put exported JAR onto the classpath - Create a source folder "src" in "Foo" with a package "p" and a type "Type" - Move classpath entry with linked JAR to the last position of classpath - Create cu "MyType": import p.Type; public class MyType extends Type {} -> Invoking Open Declaration in cu with selection import p.<Start>Type<End>; returns the same Java element twice.
SelectionRequestor.addElement(IJavaElement) should ensure that the same (i.e. equals(...)) element is not already present in the list.
Created attachment 72565 [details] Proposed fix
Released for 3.4M1. Test added: ResolveTests#testDuplicateTypeDeclaration7() Duplicate are now filtered.
Verified for 3.4M1 using build I20070802-0800.