United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6545897 Support reified generics
JDK-6545897 : Support reified generics

Details
Type:
Enhancement
Submit Date:
2007-04-13
Status:
Closed
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2007-04-16
Component:
specification
OS:
generic
Sub-Component:
language
CPU:
generic
Priority:
P4
Resolution:
Duplicate
Affected Versions:
8.0pe
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description
The Java language and Java SE should support reified generic types (aka 'true' generics)
rather than the current scheme of type erasure.  Intuitively, a programmer expects to
be able to use a generic type wherever a non-generic type can be used.  This is not
the case with type erasure.  Some advantages of reified generics are

1. Getting rid of the unchecked warnings from javac attendant upon
assigning objects of raw type to objects of the corresponding generic
type and the cryptic ClassCastExceptions that can result therefrom at
runtime.

2. Allowing arrays of generic types and parametric cast, instanceof
and catch operations.

3. Allowing 'new' operations on parametric types, e.g., 'new T()'.

4. Allowing the definition of per-instantiated-generic-type static
fields.

                                    

Comments
EVALUATION

Closing as duplicate of 5098163.
                                     
2007-04-16



Hardware and Software, Engineered to Work Together