javac, incomplete error message

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 8, 9
    • Component/s: tools
    • b08
    • Verified

      If this program is compiled:

      class Super {
          static void m() {}
      }

      class Sub extends Super {
          private static void m() {}
      }

      you obtain this error message:

      Test2.java:6: error: m() in Sub cannot override m() in Super
          private static void m() {}
                              ^
        attempting to assign weaker access privileges; was <----- was what?
      1 error

      if the static modifier is removed in both methods then the error message specify that the access was "package"

            Assignee:
            Alexander Zuev
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: