Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6249791

Method lookup error message could be more userfriendly

XMLWordPrintable

    • 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

            Unassigned Unassigned
            savadhansunw Seetharama Avadhanam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: