-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
6
-
x86
-
linux
A DESCRIPTION OF THE REQUEST :
while for method
public Constructor<T> getConstructor(Class<?>... parameterTypes)
is "generizised" giving the return type the most possible information,
this is not true for
public Constructor<?>[] getConstructors().
i think analogously to getConstructor it should be
public Constructor<T>[] getConstructors().
JUSTIFICATION :
justification as for genierics in general: avoids casts
also since java 5 awarning is given at compile time when casting
no warnings means clean code and no fear of runtime cast exceptions.
CUSTOMER SUBMITTED WORKAROUND :
casting
while for method
public Constructor<T> getConstructor(Class<?>... parameterTypes)
is "generizised" giving the return type the most possible information,
this is not true for
public Constructor<?>[] getConstructors().
i think analogously to getConstructor it should be
public Constructor<T>[] getConstructors().
JUSTIFICATION :
justification as for genierics in general: avoids casts
also since java 5 awarning is given at compile time when casting
no warnings means clean code and no fear of runtime cast exceptions.
CUSTOMER SUBMITTED WORKAROUND :
casting
- duplicates
-
JDK-6404663 Varargs parameter in Class.getConstructor(Class...) is not generic, among others
-
- Resolved
-