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

Misleading error message

XMLWordPrintable

    • generic
    • generic

      Misleading error message from compiler.
      <java-code>
      public class Foo {
          public static void main(String... args) {
             System.out.println((className.class)obj.getI());
          }
      }
      </java-code>
      <output>
      Foo.java:3: ')' expected
             System.out.println((className.class)obj.getI());
                                                 ^
      1 error
      </output>

      User can't make any thing from the above error message.
      It can be improved for better understaing like illegal cast...

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: