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

Poor error reporting situation

XMLWordPrintable

    • b67
    • generic
    • generic
    • Verified

      I just ran across a small but pretty obvious bug in javac's error
      reporting. I can understand if this is hard to fix, but is this a known problem?

      /cygdrive/c/Users/kbr/tmp>javac JavacTest.java
      JavacTest.java:7: cannot resolve symbol
      symbol : class Applet
      location: class JavacTest
         public void test(Applet foo) {
                          ^
      JavacTest.java:7: test(java.awt.Window) is already defined in JavacTest
         public void test(Applet foo) {
                     ^
      2 errors

      The first error is warranted but the second one is nonsense.
      import java.awt.*;

      public class JavacTest {
        public void test(Window foo) {
        }

        public void test(Applet foo) {
        }
      }

            ahe Peter Ahe
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: