RFR(m): JEP 269 initial API and skeleton implementation (JDK-8139232)

Peter Levart peter.levart at gmail.com
Tue Nov 24 11:30:09 UTC 2015


Hi Stuart,

>
> API spec (basically List, Map, and Set):
>
>     http://cr.openjdk.java.net/~smarks/reviews/jep269/api.20151123/
>
> Specdiff:
>
>     http://cr.openjdk.java.net/~smarks/reviews/jep269/specdiff.20151123/overview-summary.html 
>

Why do EnumSet.of(...) javadocs get this additional line:

  Specified by:
     of in interface Set<E extends java.lang.Enum<E>>

Since static interface methods are not inheritable, their specification 
should not propagate to equaly-signatured methods of classes 
implementing those interfaces (or even interfaces extending them). In 
case of EnumSet this is obviously wrong as specification of Set.of() is 
in some ways more restrictive than EnumSet.of() (EnumSet::of allows 
duplicates in arguments, Set::of doesn't). I think that javadoc tool 
needs to be fixed.

Regards, Peter




More information about the core-libs-dev mailing list