svn commit: r944487 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r944487 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

lektran
Author: lektran
Date: Fri May 14 21:37:33 2010
New Revision: 944487

URL: http://svn.apache.org/viewvc?rev=944487&view=rev
Log:
Removed redundant null check

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=944487&r1=944486&r2=944487&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java Fri May 14 21:37:33 2010
@@ -737,13 +737,11 @@ public class UtilXml {
 
         List<Node> nodes = FastList.newInstance();
 
-        if (node != null) {
-            do {
-                if (node.getNodeType() == Node.ELEMENT_NODE || node.getNodeType() == Node.COMMENT_NODE) {
-                    nodes.add(node);
-                }
-            } while ((node = node.getNextSibling()) != null);
-        }
+        do {
+            if (node.getNodeType() == Node.ELEMENT_NODE || node.getNodeType() == Node.COMMENT_NODE) {
+                nodes.add(node);
+            }
+        } while ((node = node.getNextSibling()) != null);
         return nodes;
     }