mrglavas 2004/03/29 18:50:29 Modified: java/src/org/apache/xerces/dom DOMNormalizer.java Log: Fixing Bug #28022:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=28022 Fixing a NPE in DOMNormalizer which manifests when expanding an entity reference with no children. This is fixed thanks to the patch from Neil Delima. Revision Changes Path 1.53 +2 -2 xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java Index: DOMNormalizer.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- DOMNormalizer.java 19 Mar 2004 20:34:55 -0000 1.52 +++ DOMNormalizer.java 30 Mar 2004 02:50:28 -0000 1.53 @@ -415,7 +415,7 @@ // The list of children #text -> &ent; // and entity has a first child as a text // we should not advance - if (prevSibling !=null && prevSibling.getNodeType() == Node.TEXT_NODE && + if (prevSibling != null && next != null && prevSibling.getNodeType() == Node.TEXT_NODE && next.getNodeType() == Node.TEXT_NODE) { return prevSibling; // Don't advance } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]