Diagnostics for recent test failures in java.j2seproject.
authorJesse Glick <jglick@netbeans.org>
Fri, 10 Jul 2009 11:06:20 -0400
changeset 799a4dfaa580e65
parent 798 d56dd5ce6893
child 800 1c1a1047857a
child 925 a290747c7208
Diagnostics for recent test failures in java.j2seproject.
openide.util/src/org/openide/xml/XMLUtil.java
     1.1 --- a/openide.util/src/org/openide/xml/XMLUtil.java	Wed Jul 01 08:20:46 2009 +0200
     1.2 +++ b/openide.util/src/org/openide/xml/XMLUtil.java	Fri Jul 10 11:06:20 2009 -0400
     1.3 @@ -816,8 +816,14 @@
     1.4              doc = builder.newDocument();
     1.5          }
     1.6          for (int i = 0; i < nl.getLength(); i++) {
     1.7 -            if (!(nl.item(i) instanceof DocumentType)) {
     1.8 -                doc.appendChild(doc.importNode(nl.item(i), true));
     1.9 +            Node node = nl.item(i);
    1.10 +            if (!(node instanceof DocumentType)) {
    1.11 +                try {
    1.12 +                    doc.appendChild(doc.importNode(node, true));
    1.13 +                } catch (DOMException x) {
    1.14 +                    // Thrown in NB-Core-Build #2896 & 2898 inside GeneratedFilesHelper.applyBuildExtensions
    1.15 +                    throw (IOException) new IOException("Could not import or append " + node + " of " + node.getClass()).initCause(x);
    1.16 +                }
    1.17              }
    1.18          }
    1.19          doc.normalize();