Project: JDT
Bug 98994 [templates][5.0] local collections are not resolved properly
Reported: 2005-06-08 12:21:49 | Status: verified fixed

N20050608 - Java5 JRE - resolve the "for - iterate over collection" template in the context below -> no collection is resolved class X { void m(LinkedList list) { for| } } CompilationUnitCompletion.LocalVariable.isCollection checks whether a type implements java.util.Collection. For efficieny reasons, we used to check whether one of the local variable's root interfaces was 'java.util.Collection'. In Java5, Collection is not a root interface any longer and therefore we need to check whether the type hierarchy of the type contains Collection. RC2 candidate as fix is trivial and not fixing it means that the old collection templates do not work for anyone using a Java5 JRE (even when developping 1.4 code).

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/CompilationUnitCompletion.java