On 11/24/15 3:30 AM, Peter Levart wrote:
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.

Yes, this is a javadoc bug, https://bugs.openjdk.java.net/browse/JDK-8139101 .

s'marks

Reply via email to