ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1333000 - /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
Date Wed, 02 May 2012 11:34:14 GMT
Author: veithen
Date: Wed May  2 11:34:13 2012
New Revision: 1333000

URL: http://svn.apache.org/viewvc?rev=1333000&view=rev
Log:
Fixed an issue that could cause stack overflow errors (test case pending).

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java?rev=1333000&r1=1332999&r2=1333000&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
Wed May  2 11:34:13 2012
@@ -216,14 +216,18 @@ public class OMSourcedElementImpl extend
      * @return name
      */
     private String getPrintableName() {
-        String uri = null;
-        if (getNamespace() != null) {
-            uri = getNamespace().getNamespaceURI();
-        }
-        if (uri == null || uri.length() == 0) {
-            return getLocalName();
+        if (isExpanded || (definedNamespaceSet && localName != null)) {
+            String uri = null;
+            if (getNamespace() != null) {
+                uri = getNamespace().getNamespaceURI();
+            }
+            if (uri == null || uri.length() == 0) {
+                return getLocalName();
+            } else {
+                return "{" + uri + '}' + getLocalName();
+            }
         } else {
-            return "{" + uri + '}' + getLocalName();
+            return "<unknown>";
         }
     }
 



Mime
View raw message