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

JLS3 8.4.8.3 Code example missing a space in method declaration "Tid(T x)" should be "T id(T x)"

    XMLWordPrintable

Details

    • b96
    • generic
    • generic

    Description

      The following sample code is provided as an example for assertion "Two different methods of a class may not override methods with the same erasure":

      class C<T> { T id (T x) {...} }
      interface I<T> { Tid(T x); }
      class D extends C<String> implements I<Integer> {
         String id(String x) {...}
         Integer id(Integer x) {...}
      }

      There is an obvious typo in that code: whitespace is omited in the interface method's declaration, between the method's mame and return type.

      Attachments

        Activity

          People

            iris Iris Clark
            asutchil Arkadiy Sutchilin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: