ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1201414 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java
Date Sun, 13 Nov 2011 09:25:07 GMT
Author: veithen
Date: Sun Nov 13 09:25:06 2011
New Revision: 1201414

URL: http://svn.apache.org/viewvc?rev=1201414&view=rev
Log:
Some minor code simplifications.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java?rev=1201414&r1=1201413&r2=1201414&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java
Sun Nov 13 09:25:06 2011
@@ -85,8 +85,7 @@ public class DocumentNavigator extends D
      * @return Returns the name of the element node.
      */
     public String getElementName(Object object) {
-        OMElement attr = (OMElement) object;
-        return attr.getQName().getLocalPart();
+        return ((OMElement) object).getLocalName();
     }
 
     /**
@@ -103,7 +102,7 @@ public class DocumentNavigator extends D
             prefix = namespace.getPrefix();
         }
         if (prefix == null || "".equals(prefix)) {
-            return attr.getQName().getLocalPart();
+            return attr.getLocalName();
         }
         return prefix + ":" + namespace.getNamespaceURI();
     }
@@ -126,8 +125,7 @@ public class DocumentNavigator extends D
      * @return Returns the name of the attribute node.
      */
     public String getAttributeName(Object object) {
-        OMAttribute attr = (OMAttribute) object;
-        return attr.getQName().getLocalPart();
+        return ((OMAttribute) object).getLocalName();
     }
 
     /**
@@ -140,7 +138,7 @@ public class DocumentNavigator extends D
         OMAttribute attr = (OMAttribute) object;
         String prefix = attr.getNamespace().getPrefix();
         if (prefix == null || "".equals(prefix)) {
-            return attr.getQName().getLocalPart();
+            return attr.getLocalName();
         }
         return prefix + ":" + attr.getNamespace().getNamespaceURI();
     }



Mime
View raw message