Community
Participate
Working Groups
I filed a similar bug agains Eclipse 3.1.2 yesterday (Bug 153734). Then I found out it had been fixed in Eclipse 3.2, so I've upgraded to that version now. Unfortunately, here's a related bug: the following code does not compile with "-source 1.4", although it should (and it does with Sun's javac). The error message is "The type TestCharset must implement the inherited abstract method Comparable.compareTo" It seems as if the the compiler failed to see the bridge method "compareTo(Object)" in the abstract base class java.nio.Charset. public class TestCharset extends Charset { protected TestCharset(String canonicalName, String[] aliases) { super(canonicalName, aliases); } public boolean contains(Charset cs) { return false; } public CharsetDecoder newDecoder() { return null; } public CharsetEncoder newEncoder() { return null; } }
Smells like something we should fix for 3.2.1. We did break this scenario during the 3.2 cycle to address a different bug.
Created attachment 49411 [details] Proposed patch
Created attachment 49506 [details] New proposed patch
Released for 3.2.1 Released in HEAD for 3.3 M2 Added LookupTest #68a to test method dispatch when bridge methods are found Added MethodVerifyTest #99 for the missing abstract method implementation error Put back checks in BinaryTypeBinding that were removed to fix bug 139099 and improved method lookup in Scope when bridge methods are found.
*** Bug 156447 has been marked as a duplicate of this bug. ***
Verified for 3.2.1 using build M20060908-1655.
Verified for 3.3 M2 using build I20060918-0010.
Version: 3.2.1 Build id: M20060921-0945 still fails in the scenario of compiling with 1.5 in the presence of a compareTo(Object) bridge