Author: mrglavas
Date: Fri Jul 12 14:20:16 2013
New Revision: 1502573

URL: http://svn.apache.org/r1502573
Log:
JIRA Issue #1617: https://issues.apache.org/jira/browse/XERCESJ-1617. Minor 
optimization to NodeImpl.lookupNamespaceURI(String). Patch thanks to Chris 
Simmons.

Modified:
    xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java

Modified: xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java?rev=1502573&r1=1502572&r2=1502573&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/dom/NodeImpl.java Fri Jul 12 
14:20:16 2013
@@ -1541,10 +1541,10 @@ public abstract class NodeImpl
                     int length = map.getLength();
                     for (int i=0;i<length;i++) {
                         Node attr = map.item(i);
-                        String attrPrefix = attr.getPrefix();
-                        String value = attr.getNodeValue();
                         namespace = attr.getNamespaceURI();
                         if (namespace !=null && 
namespace.equals("http://www.w3.org/2000/xmlns/";)) {
+                            String attrPrefix = attr.getPrefix();
+                            String value = attr.getNodeValue();
                             // at this point we are dealing with DOM Level 2 
nodes only
                             if (specifiedPrefix == null &&
                                 attr.getNodeName().equals("xmlns")) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to