-
Enhancement
-
Resolution: Duplicate
-
P3
-
5.0
-
x86
-
linux
Name: jl125535 Date: 08/25/2004
A DESCRIPTION OF THE REQUEST :
The title says it all. It ruins the type safety of it. Strangely, getConstructor() does return Constructor<T>.
JUSTIFICATION :
Much code cannot run with it like this and I can think of no reason why the API should be phrased this way.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Return Constructor<T>[], not Constructor[].
CUSTOMER SUBMITTED WORKAROUND :
I have patched the source to java/lang/Class.java, it compiles and seems to test out OK. Unfortunately, code developed with the patched RT cannot be run on client's machines since they want to use virgin RTs.
(Incident Review ID: 300776)
======================================================================
A DESCRIPTION OF THE REQUEST :
The title says it all. It ruins the type safety of it. Strangely, getConstructor() does return Constructor<T>.
JUSTIFICATION :
Much code cannot run with it like this and I can think of no reason why the API should be phrased this way.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Return Constructor<T>[], not Constructor[].
CUSTOMER SUBMITTED WORKAROUND :
I have patched the source to java/lang/Class.java, it compiles and seems to test out OK. Unfortunately, code developed with the patched RT cannot be run on client's machines since they want to use virgin RTs.
(Incident Review ID: 300776)
======================================================================
- duplicates
-
JDK-6229784 (reflect) Overlooked generification of java.lang.Class
-
- Resolved
-