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

DOMSerializerImpl.writeToString swallows nested exceptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 1.3.0
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.3
    • CPU:
      x86
    • OS:
      linux
    • Verification:
      Verified

      Backports

        Description

        com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl.writeToString(Node) has code like this:

        try {
          // ...
        } catch (RuntimeException e) {
          // ...
          throw new LSException(LSException.SERIALIZE_ERR, e.toString());
        } catch (IOException ioe) {
          // ...
          throw new DOMException(DOMException.DOMSTRING_SIZE_ERR, msg);
        }

        If there is a failure from some implementation-internal code, the stack trace will be lost.

        Observed because prepareForSerialization can throw NPE in

          next = node.getNextSibling();

        which I will report separately if I can figure out under which conditions it occurs.

        Observed in JDK 5 but JDK 7 seems to still have the same code.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                joehw Joe Wang
                Reporter:
                jglick Jesse Glick (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: