United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4916620 : legal cast is rejected

Details
Type:
Bug
Submit Date:
2003-09-03
Status:
Closed
Updated Date:
2006-03-15
Project Name:
JDK
Resolved Date:
2005-09-30
Component:
tools
OS:
solaris_8,linux,generic,windows_xp,windows_2000
Sub-Component:
javac
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:

Related Reports
Backport:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
The following cast is legal yet rejected:

class X {
    static class BB<T, S> { }
    static class BD<T> extends BB<T, T> { }
    void f() {
        BB<? extends Number, ? super Integer> bb = null;
        Object o = (BD<Number>) bb; // <<warn>> <<todo: cast-infer>>
    }
}

                                    

Comments
EVALUATION

This fix is scheduled for Mustang beta.

While this fix mostly causes javac to accept more
programs (which javac previously rejected), there
is a certain case of cast that will be rejected.

For more details see bug 6302956.
                                     
2005-09-26
PUBLIC COMMENTS

...
                                     
2004-09-07
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
dragon
mustang


                                     
2004-09-07
EVALUATION

This looks like a bug

###@###.### 2003-09-05
                                     
2003-09-05



Hardware and Software, Engineered to Work Together