Bug 156447 - JDT Compiler broken for generics
Summary: JDT Compiler broken for generics
Status: VERIFIED DUPLICATE of bug 153874
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.2.1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL: http://icu-project.org
Whiteboard:
Keywords:
: 156466 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-06 18:14 EDT by Ram Viswanadha CLA
Modified: 2006-09-12 08:09 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ram Viswanadha CLA 2006-09-06 18:14:18 EDT
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;
    }

}
Comment 1 Olivier Thomann CLA 2006-09-06 21:14:14 EDT
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 ***
Comment 2 Frederic Fusier CLA 2006-09-07 03:50:40 EDT
*** Bug 156466 has been marked as a duplicate of this bug. ***
Comment 3 Frederic Fusier CLA 2006-09-12 08:09:41 EDT
Verified for 3.2.1 using build M20060908-1655.