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

code at c.s.x.i.m.saaj.soap.MessageImpl must be modified to avoid crash after javac change

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: xml
    • Labels:

      Description

      due to a bug in javac this code in com.sun.xml.internal.messaging.saaj.soap.MessageImpl was being accepted:

      static private final Iterator<AttachmentPart> nullIter = Collections.<AttachmentPart>EMPTY_LIST.iterator();

      according to the JLS 15.12, it shouldn't be accepted. The proposed change is:

      -static private final Iterator<AttachmentPart> nullIter = Collections.<AttachmentPart>EMPTY_LIST.iterator();
      +static private final Iterator<AttachmentPart> nullIter = Collections.EMPTY_LIST.<AttachmentPart>iterator();

      which is minimal and won't affect the semantics of the existing code

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zli Zheng Jun Li
                Reporter:
                vromero Vicente Arturo Romero Zaldivar
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: