Author: chinthaka
Date: Tue Aug 29 22:27:08 2006
New Revision: 438378

URL: http://svn.apache.org/viewvc?rev=438378&view=rev
Log:
Null was not handled when passed in to the constructor as text. Null is now 
considered as EMPTY_STRING which is now assigned to ""

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

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=438378&r1=438377&r2=438378&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
 Tue Aug 29 22:27:08 2006
@@ -161,12 +161,7 @@
             if (ns != null) {
                 this.ns = ns;
             }
-        } else
-
-        {
-            // no namespace URI in the given QName. No need to bother about 
this ??
-        }
-
+        } 
         return ns;
     }
 

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java?rev=438378&r1=438377&r2=438378&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
 Tue Aug 29 22:27:08 2006
@@ -71,6 +71,7 @@
      * Field attributes used when serializing Binary stuff as MTOM optimized.
      */
     protected OMAttribute attribute;
+    private static final String EMTPY_STRING = "";
 
     /**
      * Constructor OMTextImpl.
@@ -88,7 +89,7 @@
      */
     public OMTextImpl(String s, int nodeType, OMFactory factory) {
         super(factory);
-        this.value = s;
+        this.value = s == null ? EMTPY_STRING : s;
         this.nodeType = nodeType;
     }
  
@@ -105,7 +106,7 @@
     public OMTextImpl(OMContainer parent, String text, int nodeType,
                       OMFactory factory) {
         super(parent, factory);
-        this.value = text;
+        this.value = text == null ? EMTPY_STRING : text;
         done = true;
         this.nodeType = nodeType;
     }
@@ -127,7 +128,7 @@
                       OMFactory factory) {
         super(parent, factory);
         this.textNS = ((OMElementImpl) parent).handleNamespace(text);
-        this.value = text.getLocalPart();
+        this.value = text == null ? EMTPY_STRING : text.getLocalPart();
         done = true;
         this.nodeType = nodeType;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to