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

Poor error reporting situation

    Details

    • Subcomponent:
    • Resolved In Build:
      b67
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      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) {
        }
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: