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

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

XMLWordPrintable

    • 1.2beta
    • generic, x86, sparc
    • generic, solaris_2.5.1, windows_95, windows_nt
    • Verified



      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
      >

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: