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

Throws clauses incompatible with Object methods allowed in interfaces

    Details

    • Subcomponent:
    • Resolved In Build:
      hopper
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: