You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2011/07/22 20:12:17 UTC

svn commit: r1149680 - in /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src: main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java

Author: veithen
Date: Fri Jul 22 18:12:17 2011
New Revision: 1149680

URL: http://svn.apache.org/viewvc?rev=1149680&view=rev
Log:
AXIOM-372: Finalized the work started in r1149140.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java?rev=1149680&r1=1149679&r2=1149680&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java Fri Jul 22 18:12:17 2011
@@ -205,6 +205,9 @@ public class OMDOMFactory implements OMF
         if (namespaceURI == null) {
             throw new IllegalArgumentException("namespaceURI must not be null");
         } else if (namespaceURI.length() == 0) {
+            if (prefix != null && prefix.length() > 0) {
+                throw new IllegalArgumentException("Cannot create a prefixed element with an empty namespace name");
+            }
             return createOMElement(localName, null);
         } else {
             return createOMElement(localName, createOMNamespace(namespaceURI, prefix));

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java?rev=1149680&r1=1149679&r2=1149680&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java Fri Jul 22 18:12:17 2011
@@ -32,7 +32,6 @@ import org.apache.axiom.ts.om.element.Te
 import org.apache.axiom.ts.om.element.TestSetTextQNameWithEmptyPrefix;
 import org.apache.axiom.ts.om.element.TestSetTextQNameWithoutNamespace;
 import org.apache.axiom.ts.om.factory.TestCreateOMElementWithGeneratedPrefix;
-import org.apache.axiom.ts.om.factory.TestCreateOMElementWithInvalidNamespace;
 import org.apache.axiom.ts.om.node.TestInsertSiblingAfterOnChild;
 import org.apache.axiom.ts.om.node.TestInsertSiblingBeforeOnChild;
 
@@ -81,9 +80,6 @@ public class OMImplementationTest extend
         // TODO: investigate why this is not working with DOOM
         builder.exclude(TestGetChildrenWithName4.class);
         
-        // TODO: Need to fix AXIOM-373 first
-        builder.exclude(TestCreateOMElementWithInvalidNamespace.class);
-        
         return builder.build();
     }
 }