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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 9
    • xml

      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

            zli Zheng Jun Li (Inactive)
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: