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

"attemping to assign weaker access" message doesn't give method line number

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.4.1
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      hopper
    • CPU:
      generic
    • OS:
      solaris_7
    • Verification:
      Verified

      Description

      This is a reopen of 4413454

      In the following type of error message:

         Test.java:7: method() in Test cannot implement method() in Interface;
      attempting to assign weaker access privileges; was public
        public class Test
               ^

      it would be helpful if the compiler reported the line number of the declaration
      of the method instead of the line number of the class.


      Here's a test case:

      ----------------------------------------
      interface Interface
      {
          void method();
      } // interface Interface


      public class Test
             implements Interface
      {
          void method()
          {
          } // method()
      } // class Test
      ----------------------------------------
      Test.java:7: method() in Test cannot implement method() in Interface; attempting
      to assign weaker access privileges; was public
      public class Test
             ^
      1 error

      ###@###.### 2001-11-07

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gafter Neal Gafter
              Reporter:
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: