Community
Participate
Working Groups
The attached project builds correctly with M7 but produces errors about not being able to find org.eclipse.core.expressions.expression. It appears to be related to the fact that there are overloaded methods some of which refer to Expression which isn't available unless you actually depend on its plugin directly. The GMF source code has two such problems. Another one occurs when it uses org.apache.batik.dom.util.DOMUtilities.deepCloneDocument (as static) where DOMUtilities extends XMLUtilities, which is not available on the classpath. This seems similar but a bit different.
Created attachment 99454 [details] A tiny project with the problem
Rich, The GMF code is affected by this issue.
This behavior was introduced with the fix to bug 214558. Reverting this fix makes the project build with no error. Note that the project's classpath is incomplete. But it seems that we are less lazy than before. Thus we ask for types that are not on the classpath.
Fix for bug 214558 is necessary though. We used to select exact matches, and sometimes bind to the wrong method. In essence, we should have been selecting amongst several methods and not just one; inducing some more resolutions than wanted. Kent - pls check that Ed's scenario indeed does involve raw types. Also could we simply ignore methods with are not resolvable ? (ignore them from lookup semantics so as to reduce secondary errors).
There are no raw types involved in the example. If we want to maintain the same level of laziness as far as type resolution is concerned, then I suggest we change findExactMethod in Scope, which was released for bug 214558 to be: public MethodBinding findExactMethod(ReferenceBinding receiverType, ...) { CompilationUnitScope unitScope = compilationUnitScope(); unitScope.recordTypeReferences(argumentTypes); MethodBinding exactMethod = receiverType.getExactMethod(selector... if (exactMethod != null && exactMethod.typeVariables...) { // in >= 1.5 mode, ensure the exactMatch did not match raw types if (compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) for (int i = argumentTypes.length; --i >= 0;) if (argumentTypes[i].isRawType()) return null; Philippe, +1 ?
Created attachment 99757 [details] Proposed patch
+1 for 3.4RC1
Created attachment 99964 [details] Same patch but added testcase
Released for 3.4RC1 Added Java50Tests.testMissingRequiredBinaries()
Verified for 3.4 RC1 using build I20080513-2000.