-
Enhancement
-
Resolution: Rejected
-
P5
-
None
-
7
-
generic
-
generic
For the following example
String t = "test"
Class c = t.getClass();
Class sig[] = new Class[2];
sig[0] = null;
sig[1] = null;
c.getMethod("foo", sig);
compiler prints the following warning msg:
warning: [unchecked] unchecked call to getMethod(java.lang.String,java.lang.Class<?>...)
as a member of the raw type java.lang.Class
Changing the Class type of "c" to Class<?> removes the warning msg.
Discussed this with Peter and he said:
>I don't think the compiler needs to give a warning in this particular
>case.
String t = "test"
Class c = t.getClass();
Class sig[] = new Class[2];
sig[0] = null;
sig[1] = null;
c.getMethod("foo", sig);
compiler prints the following warning msg:
warning: [unchecked] unchecked call to getMethod(java.lang.String,java.lang.Class<?>...)
as a member of the raw type java.lang.Class
Changing the Class type of "c" to Class<?> removes the warning msg.
Discussed this with Peter and he said:
>I don't think the compiler needs to give a warning in this particular
>case.