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

no error for abstract method with private, final, native, synchronized modifiers

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta
    • CPU:
      generic, x86, sparc
    • OS:
      generic, solaris_2.5.1, windows_95, windows_nt
    • Verification:
      Verified

      Description



      Name: ###@###.### Date: 09/05/96


      Java language specification (8.4.3 Method Modifiers) says:
      "A compile-time error occurs if a method declaration that contains the
      keyword abstract also contains any one of the keywords private, static,
      final, native, or synchronized."
      (See also 8.4.3.1-5)

      However compiler doesn't report any error for the following cases:

      -----------------------clss12301.java---------------------------
      abstract class clss12301_a {
      private abstract void f1(); //compile-time error
      final abstract void f2(); //compile-time error
      native abstract void f3(); //compile-time error
      synchronized abstract void f4(); //compile-time error
      }
      -------------------------------------------------------------

      > javac clss12301.java
      >

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dstoutamsunw David Stoutamire (Inactive)
              Reporter:
              leosunw Leo Leo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: