Community
Participate
Working Groups
I20050610-1757 (3.1RC2) public class Anon { void test() { new java.util.ArrayList<Integer>() } } Invoke content assist after 'ArrayList<Integer>(' and choose the anonymous. -> The methods to be overridden are constructed for a raw ArrayList (they have their 'E's replaced by 'Object' instead of 'Integer').
Tobias, can you please investigate.
The problem is IJavaProject#findType, which does not work for parameterized types and local types. To fix the case for parameterized types, I suggest to extract the correct type signature from the proposal's signature. To fix the proposal for local types, we have to investigate in using the supplied binding key. This won't happen anymore for 3.1.
Created attachment 23276 [details] patch This patch fixes the code to retrieve the supertype to use the declaration signature obtained from JDT Core
Filed bug 100365 to track binding key issue
Tobias, in general not renaming elements makes it easier to read patches. Some questions: - why do we check fDeclarationSignature != null. We assert it to not be null in the constructor. - +1 for RC3 from my side, but I want to get Martins opinion because he knows this area very well. Martin, can you please vote
The name fDeclaringType is a misnomer and has lead to some confusion when reviewing the code.
The null check is indeed not necessary
After checking it again the patch as some low risk to break scenarios that are currently tested. To avoid redoing the testing I now opt to postpone > 3.1 Tobias, this is a good candiate for 3.1.1. We should release it early 3.2 and the think about back porting it.
Fixed in HEAD > 20050630
Martin, can you please vote on this one?
patch looks good!
Fixed in 3.1 maintenance stream > 200508010
verifying...
verified the correct type substitutions are made.