-
Enhancement
-
Resolution: Cannot Reproduce
-
P4
-
None
-
6
-
generic
-
generic
Please see the following code:
public class Test9{
public<T> T myMethod(Object st){
}
public static void main(String... arg){
Test9 test = new Test9();
test.myMethod();
}
}
Output of the code when compiled:
bash-2.05b$ $b/javac Test9.java
Test9.java:26: <T>myMethod(java.lang.Object) in Test9 cannot be applied to ()
test.myMethod();
^
1 error
Better wording of exception message will be more user friendly.
###@###.### 2005-04-03 12:23:55 GMT
public class Test9{
public<T> T myMethod(Object st){
}
public static void main(String... arg){
Test9 test = new Test9();
test.myMethod();
}
}
Output of the code when compiled:
bash-2.05b$ $b/javac Test9.java
Test9.java:26: <T>myMethod(java.lang.Object) in Test9 cannot be applied to ()
test.myMethod();
^
1 error
Better wording of exception message will be more user friendly.
###@###.### 2005-04-03 12:23:55 GMT
- relates to
-
JDK-6717241 some diagnostic argument is prematurely converted into a String object
-
- Closed
-