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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • tools
    • x86
    • windows_nt



      Name: ssT124754 Date: 02/08/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      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
      ----------------------------------------


      DSB/DFI
      (Review ID: 116557)
      ======================================================================

            gafter Neal Gafter (Inactive)
            ssultanasunw Shaheen Sultana (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: