Community
Participate
Working Groups
Compilation of subclasses of java.nio.Charset fail if the the installed JRE is JDK 1.5.0 with Eclipse with an error that subclasses of Charset must implement compareTo(Object o) method. Compilation works from command line. To reproduce: 1. Create a project in Eclipse 3.2 2. Set the installed JRE to Sun JDK 1.5.0 3. Add the following class to the project and build. import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; public class Charset88591 extends Charset { protected Charset88591(String canonicalName, String[] aliases) { super(canonicalName, aliases); // TODO Auto-generated constructor stub } public boolean contains(Charset cs) { // TODO Auto-generated method stub return false; } public CharsetDecoder newDecoder() { // TODO Auto-generated method stub return null; } public CharsetEncoder newEncoder() { // TODO Auto-generated method stub return null; } }
If your compliance is set to 1.5, you can either set the source level to 1.4 or 1.5 and it works with HEAD. This might be related to bug 153874. Closing as dup of bug 153874. Please try again with next integration build or the latest 3.2.1 maintenance build. *** This bug has been marked as a duplicate of 153874 ***
*** Bug 156466 has been marked as a duplicate of this bug. ***
Verified for 3.2.1 using build M20060908-1655.