xsddoc/src/net/sf/xframe/xsddoc/util DomUtil.java,1.3,1.4
Kurt Riede <[email protected]> Wed, 15 Dec 2004 11:53:23 +0000
| Newsgroups | gmane.text.xml.xframe.xsddoc.devel |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2274/src/net/sf/xframe/xsddoc/util
Modified Files:
DomUtil.java
Log Message:
Method removeDuplicates: now fail safe against null arguments
Index: DomUtil.java
===================================================================
RCS file: /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/util/DomUtil.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DomUtil.java 9 Dec 2004 12:42:18 -0000 1.3
--- DomUtil.java 15 Dec 2004 11:53:20 -0000 1.4
***************
*** 77,80 ****
--- 77,83 ----
*/
public static Node removeDuplicates(final Node parent) {
+ if (parent == null) {
+ return null;
+ }
final NodeList children = parent.getChildNodes();
for (int i = children.getLength() - 1; i >= 0; i--) {
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/