javac is accepting some code that doesn't look right according to the spec.
In module java.xml.ws, class MessageImpl [1], the following line appear:
static private final Iterator<AttachmentPart> nullIter =
Collections.<AttachmentPart>EMPTY_LIST.iterator();
I believe javac should reject this, there shouldn't be a type argument
at that location. The type argument should be on iterator() like
below, as per JLS 15.12
<https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.12> in
the spec.
static private final Iterator<AttachmentPart> nullIter =
Collections.EMPTY_LIST.<AttachmentPart>iterator();
In module java.xml.ws, class MessageImpl [1], the following line appear:
static private final Iterator<AttachmentPart> nullIter =
Collections.<AttachmentPart>EMPTY_LIST.iterator();
I believe javac should reject this, there shouldn't be a type argument
at that location. The type argument should be on iterator() like
below, as per JLS 15.12
<https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.12> in
the spec.
static private final Iterator<AttachmentPart> nullIter =
Collections.EMPTY_LIST.<AttachmentPart>iterator();
- is blocked by
-
JDK-8186314 code at c.s.x.i.m.saaj.soap.MessageImpl must be modified to avoid crash after javac change
- Resolved