ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1162486 - in /webservices/commons/trunk/modules/axiom/modules: axiom-api/src/main/java/org/apache/axiom/om/ axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/ axiom-testsuite/src/main/java/org/apache/axiom/ts/ axiom-testsuite/src/main/j...
Date Sun, 28 Aug 2011 09:04:35 GMT
Author: veithen
Date: Sun Aug 28 09:04:35 2011
New Revision: 1162486

URL: http://svn.apache.org/viewvc?rev=1162486&view=rev
Log:
Added a few new test cases for the OMFactory#createOMElement methods and clarified the Javadoc.
This also reveals additional problems with the DOOM implementation.

Added:
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNamespaceInScope.java
  (with props)
Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMElementCreator.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
Sun Aug 28 09:04:35 2011
@@ -53,6 +53,12 @@ public interface OMFactory {
     OMElement createOMElement(String localName, OMNamespace ns);
 
     /**
+     * Create an element with the given name and parent. If the specified {@link OMNamespace}
has a
+     * namespace URI but a <code>null</code> prefix, the method will use an appropriate
prefix if a
+     * corresponding namespace declaration is in scope on the parent or generate a new prefix
if no
+     * corresponding namespace declaration is in scope. If a new prefix is generated or if
the
+     * specified prefix and namespace URI are not bound in the scope of the parent element,
the
+     * method will add an appropriate namespace declaration to the new element.
      * 
      * @param localName
      * @param ns
@@ -119,23 +125,24 @@ public interface OMFactory {
                                      String prefix);
 
     /**
-     * Create an OMElement with the given QName under the given parent.
-     *
-     * If the QName contains a prefix, we will ensure that an OMNamespace is created
-     * mapping the given namespace to the given prefix.  If no prefix is passed, we'll
-     * use whatever's already mapped in the parent, or create a generated one.
-     *
-     * @param qname the QName of the element to create
+     * Create an element with the given {@link QName} and parent. If a namespace URI is given
but no
+     * prefix, the method will use an appropriate prefix if a corresponding namespace declaration
is
+     * in scope on the parent or generate a new prefix if no corresponding namespace declaration
is
+     * in scope. If a new prefix is generated or if the specified prefix and namespace URI
are not
+     * bound in the scope of the parent element, the method will add an appropriate namespace
+     * declaration to the new element.
+     * 
+     * @param qname
+     *            the {@link QName} defining the name of the element to be created
      * @param parent
      *            the parent to which the newly created element will be added; this may be
      *            <code>null</code>, in which case the behavior of the method
is the same as
      *            {@link #createOMElement(QName)}
-     * @return Returns the new OMElement
-     * @throws OMException if there's a namespace mapping problem
+     * @return the new element
      * @throws IllegalArgumentException
      *             if an attempt is made to create a prefixed element with an empty namespace
name
      */
-    OMElement createOMElement(QName qname, OMContainer parent) throws OMException;
+    OMElement createOMElement(QName qname, OMContainer parent);
 
     /**
      * Create an element with the given {@link QName}. If a namespace URI is given but no
prefix,
@@ -147,12 +154,10 @@ public interface OMFactory {
      * @param qname
      *            the {@link QName} defining the name of the element to be created
      * @return the new element
-     * @throws OMException
-     *             TODO: when???
      * @throws IllegalArgumentException
      *             if an attempt is made to create a prefixed element with an empty namespace
name
      */
-    OMElement createOMElement(QName qname) throws OMException;
+    OMElement createOMElement(QName qname);
 
     /**
      * Create an {@link OMNamespace} instance or retrieve an existing one if the factory
supports

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=1162486&r1=1162485&r2=1162486&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
Sun Aug 28 09:04:35 2011
@@ -32,6 +32,7 @@ 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.TestCreateOMElementWithNamespaceInScope;
 import org.apache.axiom.ts.om.node.TestInsertSiblingAfterOnChild;
 import org.apache.axiom.ts.om.node.TestInsertSiblingBeforeOnChild;
 
@@ -57,6 +58,8 @@ public class OMImplementationTest extend
         
         // TODO: DOOM's behavior differs from LLOM's behavior in this case
         builder.exclude(TestCreateOMElementWithGeneratedPrefix.class, "(variant=QName*)");
+        builder.exclude(TestCreateOMElementWithNamespaceInScope.class, "(variant=QName,OMContainer)");
+        builder.exclude(TestCreateOMElementWithNamespaceInScope.class, "(variant=String,OMNamespace,OMContainer)");
         
         // DOOM doesn't support CDATA sections
         builder.exclude(TestGetXMLStreamReaderCDATAEventFromElement.class);

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
Sun Aug 28 09:04:35 2011
@@ -178,6 +178,9 @@ public class OMTestSuiteBuilder extends 
             }
             addTest(new org.apache.axiom.ts.om.factory.TestCreateOMElementWithGeneratedPrefix(metaFactory,
creator));
             addTest(new org.apache.axiom.ts.om.factory.TestCreateOMElementWithInvalidNamespace(metaFactory,
creator));
+            if (creator.isSupportsContainer()) {
+                addTest(new org.apache.axiom.ts.om.factory.TestCreateOMElementWithNamespaceInScope(metaFactory,
creator));
+            }
             addTest(new org.apache.axiom.ts.om.factory.TestCreateOMElementWithNonDefaultNamespace(metaFactory,
creator));
             addTest(new org.apache.axiom.ts.om.factory.TestCreateOMElementWithoutNamespace(metaFactory,
creator));
         }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMElementCreator.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMElementCreator.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMElementCreator.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMElementCreator.java
Sun Aug 28 09:04:35 2011
@@ -20,14 +20,15 @@ package org.apache.axiom.ts.om.factory;
 
 import javax.xml.namespace.QName;
 
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 
 public abstract class OMElementCreator {
     public static final OMElementCreator[] INSTANCES = new OMElementCreator[] {
-        new OMElementCreator("QName", false) {
-            public OMElement createOMElement(OMFactory factory, String localName,
+        new OMElementCreator("QName", false, false) {
+            public OMElement createOMElement(OMFactory factory, OMContainer parent, String
localName,
                     String namespaceURI, String prefix) {
                 if (prefix == null) {
                     prefix = "";
@@ -35,31 +36,31 @@ public abstract class OMElementCreator {
                 return factory.createOMElement(new QName(namespaceURI, localName, prefix));
             }
         },
-        new OMElementCreator("QName,OMContainer", false) {
-            public OMElement createOMElement(OMFactory factory, String localName,
+        new OMElementCreator("QName,OMContainer", false, true) {
+            public OMElement createOMElement(OMFactory factory, OMContainer parent, String
localName,
                     String namespaceURI, String prefix) {
                 if (prefix == null) {
                     prefix = "";
                 }
-                return factory.createOMElement(new QName(namespaceURI, localName, prefix),
null);
+                return factory.createOMElement(new QName(namespaceURI, localName, prefix),
parent);
             }
         },
-        new OMElementCreator("String,OMNamespace", true) {
-            public OMElement createOMElement(OMFactory factory, String localName,
+        new OMElementCreator("String,OMNamespace", true, false) {
+            public OMElement createOMElement(OMFactory factory, OMContainer parent, String
localName,
                     String namespaceURI, String prefix) {
                 return factory.createOMElement(localName,
                         getOMNamespace(factory, namespaceURI, prefix));
             }
         },
-        new OMElementCreator("String,OMNamespace,OMContainer", true) {
-            public OMElement createOMElement(OMFactory factory, String localName,
+        new OMElementCreator("String,OMNamespace,OMContainer", true, true) {
+            public OMElement createOMElement(OMFactory factory, OMContainer parent, String
localName,
                     String namespaceURI, String prefix) {
                 return factory.createOMElement(localName,
-                        getOMNamespace(factory, namespaceURI, prefix), null);
+                        getOMNamespace(factory, namespaceURI, prefix), parent);
             }
         },
-        new OMElementCreator("String,String,String", true) {
-            public OMElement createOMElement(OMFactory factory, String localName,
+        new OMElementCreator("String,String,String", true, false) {
+            public OMElement createOMElement(OMFactory factory, OMContainer parent, String
localName,
                     String namespaceURI, String prefix) {
                 return factory.createOMElement(localName, namespaceURI, prefix);
             }
@@ -68,22 +69,62 @@ public abstract class OMElementCreator {
     
     private final String name;
     private final boolean supportsDefaultNamespace;
+    private final boolean supportsContainer;
     
-    public OMElementCreator(String name, boolean supportsDefaultNamespace) {
+    public OMElementCreator(String name, boolean supportsDefaultNamespace, boolean supportsContainer)
{
         this.name = name;
         this.supportsDefaultNamespace = supportsDefaultNamespace;
+        this.supportsContainer = supportsContainer;
     }
 
     public final String getName() {
         return name;
     }
 
+    /**
+     * Determines whether this strategy can be used to create an {@link OMElement} in the
default
+     * namespace, i.e. with an empty prefix.
+     * 
+     * @return <code>true</code> if the strategy supports default namespaces,
<code>false</code>
+     *         otherwise
+     */
     public final boolean isSupportsDefaultNamespace() {
         return supportsDefaultNamespace;
     }
 
-    public abstract OMElement createOMElement(OMFactory factory, String localName,
-            String namespaceURI, String prefix);
+    /**
+     * Determines whether this strategy can be used to create an {@link OMElement} as a child
of
+     * another container.
+     * 
+     * @return <code>true</code> if a {@link OMContainer} object can be passed
to
+     *         {@link #createOMElement(OMFactory, OMContainer, String, String, String)}
+     */
+    public final boolean isSupportsContainer() {
+        return supportsContainer;
+    }
+
+    /**
+     * Create an {@link OMElement}.
+     * 
+     * @param factory
+     *            the factory used to create the element
+     * @param parent
+     *            the parent of the element to be created or <code>null</code>
to create an orphaned
+     *            element; this parameter can only be used if {@link #isSupportsContainer()}
returns
+     *            <code>true</code>
+     * @param localName
+     *            the local name of the element
+     * @param namespaceURI
+     *            the namespace URI of the element
+     * @param prefix
+     *            the prefix of the element, the empty string if the element is to be created
in the
+     *            default namespace (only supported if {@link #isSupportsDefaultNamespace()}
returns
+     *            <code>true</code>), or <code>null</code> if a prefix
should be generated or chosen
+     *            based on the namespace context of the parent
+     * @return the created element
+     */
+    public abstract OMElement createOMElement(OMFactory factory, OMContainer parent,
+            String localName, String namespaceURI, String prefix);
     
     static OMNamespace getOMNamespace(OMFactory factory, String namespaceURI, String prefix)
{
         if (prefix == null) {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
Sun Aug 28 09:04:35 2011
@@ -32,7 +32,7 @@ public class TestCreateOMElementWithDefa
 
     protected void runTest() throws Throwable {
         OMFactory factory = metaFactory.getOMFactory();
-        OMElement element = variant.createOMElement(factory, "test", "urn:ns", "");
+        OMElement element = variant.createOMElement(factory, null, "test", "urn:ns", "");
         assertTrue(element.isComplete());
         assertEquals("test", element.getLocalName());
         OMNamespace ns = factory.createOMNamespace("urn:ns", "");

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
Sun Aug 28 09:04:35 2011
@@ -32,7 +32,7 @@ public class TestCreateOMElementWithGene
 
     protected void runTest() throws Throwable {
         OMFactory factory = metaFactory.getOMFactory();
-        OMElement element = variant.createOMElement(factory, "test", "urn:test", null);
+        OMElement element = variant.createOMElement(factory, null, "test", "urn:test", null);
         assertEquals("test", element.getLocalName());
         OMNamespace ns = element.getNamespace();
         assertNotNull(ns);

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
Sun Aug 28 09:04:35 2011
@@ -33,7 +33,7 @@ public class TestCreateOMElementWithInva
     protected void runTest() throws Throwable {
         OMFactory factory = metaFactory.getOMFactory();
         try {
-            variant.createOMElement(factory, "test", "", "p");
+            variant.createOMElement(factory, null, "test", "", "p");
             fail("Expected IllegalArgumentException");
         } catch (IllegalArgumentException ex) {
             // Expected

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNamespaceInScope.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNamespaceInScope.java?rev=1162486&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNamespaceInScope.java
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNamespaceInScope.java
Sun Aug 28 09:04:35 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.om.factory;
+
+import java.util.Iterator;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMNamespace;
+
+/**
+ * Tests the behavior of the <code>createOMElement</code> methods in {@link OMFactory}
if no
+ * namespace prefix is given and an existing namespace declaration is in scope. In this case,
+ * <code>createOMElement</code> must use the existing prefix. Note that this
only applies if a
+ * parent is specified for the {@link OMElement} to be created.
+ */
+public class TestCreateOMElementWithNamespaceInScope extends CreateOMElementTestCase {
+    public TestCreateOMElementWithNamespaceInScope(OMMetaFactory metaFactory, OMElementCreator
variant) {
+        super(metaFactory, variant);
+    }
+
+    protected void runTest() throws Throwable {
+        OMFactory factory = metaFactory.getOMFactory();
+        OMElement parent = factory.createOMElement("parent", "urn:test", "p");
+        OMElement child = variant.createOMElement(factory, parent, "child", "urn:test", null);
+        assertTrue(child.isComplete());
+        assertEquals("child", child.getLocalName());
+        OMNamespace ns = factory.createOMNamespace("urn:test", "p");
+        assertEquals(ns, child.getNamespace());
+        Iterator it = child.getAllDeclaredNamespaces();
+        assertFalse(it.hasNext());
+    }
+}

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNamespaceInScope.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
Sun Aug 28 09:04:35 2011
@@ -32,7 +32,7 @@ public class TestCreateOMElementWithNonD
 
     protected void runTest() throws Throwable {
         OMFactory factory = metaFactory.getOMFactory();
-        OMElement element = variant.createOMElement(factory, "test", "urn:ns", "ns");
+        OMElement element = variant.createOMElement(factory, null, "test", "urn:ns", "ns");
         assertTrue(element.isComplete());
         assertEquals("test", element.getLocalName());
         OMNamespace ns = factory.createOMNamespace("urn:ns", "ns");

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java?rev=1162486&r1=1162485&r2=1162486&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java
Sun Aug 28 09:04:35 2011
@@ -29,7 +29,7 @@ public class TestCreateOMElementWithoutN
 
     protected void runTest() throws Throwable {
         OMFactory factory = metaFactory.getOMFactory();
-        OMElement element = variant.createOMElement(factory, "test", "", "");
+        OMElement element = variant.createOMElement(factory, null, "test", "", "");
         assertEquals("test", element.getLocalName());
         assertNull(element.getNamespace());
         assertFalse(element.getAllDeclaredNamespaces().hasNext());



Mime
View raw message