Automated merge with main-silver
authorffjre@netbeans.org
Sat, 11 Jul 2009 02:56:07 +0400
changeset 925a290747c7208
parent 924 fe3d6e386634
parent 799 a4dfaa580e65
child 926 8981ec62a25d
Automated merge with main-silver
     1.1 --- a/openide.util/src/org/openide/xml/XMLUtil.java	Thu Jul 02 03:57:56 2009 +0400
     1.2 +++ b/openide.util/src/org/openide/xml/XMLUtil.java	Sat Jul 11 02:56:07 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();