Community
Participate
Working Groups
N20050503-0010 After switching to N20050503-0010, importing all binary plug-ins and rebuilding everything I get two compile errors which are wrong: 1) in org.eclipse.core.expressions: org.eclipse.core.internal.expressions.PropertyCache: even though there's a correct import: import java.util.Map.Entry; an error is reported where Entry is used: public PropertyCache(final int cacheSize) { // start with 100 elements but be able to grow until cacheSize fCache= new LinkedHashMap(100, 0.75f, true) { /** This class is not intended to be serialized. */ private static final long serialVersionUID= 1L; protected boolean removeEldestEntry(Entry eldest) { return size() > cacheSize; } }; } 2) in org.eclipse.jdt.ui: org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor same here: correct import: import org.eclipse.swt.events.SelectionListener; is not recognized and error is reported where SelectionListener is used: private SelectionListener getButtonListener(final IClasspathEntry entry, final IPath containerPath, final IJavaProject jproject) { return new SelectionListener() { public void widgetSelected(SelectionEvent event) { ... WORKAROUND: fully qualify those types.
On 1) I am seeing a visibility issue. Is it what you saw as well ?
correct, the error is: The type Entry is not visible PropertyCache.java org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions line 25
Kent - this is a consequence of the getTypeOrPackage caching change. Problem is that in check for ambiguous case, it shouldn't consider non visible foundType. Please double check my change.
Added LookupTest#test054. Dani - problem comes from the fact that LinkedHashMap defines a private member type named Entry, which we consider incorrectly.
We should only cache positive hits then, since error cases do not happen in 'good' code.
Fix released to HEAD.
Caching problem bindings is not the problem here.
Changed the fix to remove caching of problem types.
*** Bug 93607 has been marked as a duplicate of this bug. ***
verified in I20050509-2010