Community
Participate
Working Groups
Created attachment 138828 [details] DelegatingList Much like https://bugs.eclipse.org/bugs/show_bug.cgi?id=276800, I distilled down another Eclipse vs javac "validness" disagreement. See attached class. The error I get on line 13 is: The type new DelegatingList(){} must implement the inherited abstract method List.set(int, Object) What seems to be happening in broad terms is that due to the use of raw types, Eclipse is not figuring out that the existing "public T set(int index, T element) {" is said method.
Created attachment 139584 [details] Proposed patch and testcase
Released for 3.6M1 in HEAD Olivier - please review for 3.5.1
+1 for 3.5.1.
Released to R3_5_maintenance for 3.5.1
Would you check if this is also fixed by this fix, please? Thanks, Z ********************* public class Snippet { private static final class Contract implements Comparable { @Override public int compareTo(Object o) { return 0; }} public Contract getLatestContract() { Collection<Contract> contracts = null; return Collections.max(contracts); } }
Yes the error on compareTo(Object) is 'fixed', but the return type statement return Collections.max(contracts); still produces an error.
Should I file a new bug for this, then?
Verified for 3.6M1 using build I20090803-1300
Verified for 3.5.1 using build M20090826-1100. No problem in the original case. However, for the case given in comment #5, the error on compareTo(Object) is still reported. Filed a new bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=287816
Verified.