Author: mrglavas
Date: Fri Jul 12 14:20:50 2013
New Revision: 1502574

URL: http://svn.apache.org/r1502574
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/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java?rev=1502574&r1=1502573&r2=1502574&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java 
(original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/NodeImpl.java 
Fri Jul 12 14:20:50 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