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

Throws clauses incompatible with Object methods allowed in interfaces

    XMLWordPrintable

Details

    • hopper
    • generic
    • generic
    • Verified

    Description

      The compiler currently accepts:

      package ObjectSubtyping;

      interface K {

        String toString() throws java.io.IOException;
        int hashCode() throws Exception;

      }

      This contradicts JLS2 section 9.2 (see top of page 203).

      gilad.bracha@eng 2001-07-12

      Attachments

        Activity

          People

            gafter Neal Gafter
            gbrachasunw Gilad Bracha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: