This is an automated email from the ASF dual-hosted git repository.

veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git


The following commit(s) were added to refs/heads/master by this push:
     new 42b34f9e6 Fix the OMFactory.createOMText(OMContainer, QName) 
implementation
42b34f9e6 is described below

commit 42b34f9e62573d06775ac3c37edc1689a4ec2d7b
Author: Andreas Veithen-Knowles <[email protected]>
AuthorDate: Tue Jun 9 07:10:21 2026 +0000

    Fix the OMFactory.createOMText(OMContainer, QName) implementation
---
 .../apache/axiom/om/impl/common/factory/OMFactoryImpl.java   |  2 +-
 .../java/org/apache/axiom/ts/om/factory/OMFactoryTests.java  | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
 
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
index 103135ba0..3a7f44eab 100644
--- 
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
+++ 
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
@@ -164,7 +164,7 @@ public class OMFactoryImpl implements OMFactory {
 
     @Override
     public final OMText createOMText(OMContainer parent, QName text) {
-        return createAxiomText(parent, text, OMNode.TEXT_NODE);
+        return createOMText(parent, text, OMNode.TEXT_NODE);
     }
 
     @Override
diff --git 
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMFactoryTests.java
 
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMFactoryTests.java
index d85f57397..6339bf7d9 100644
--- 
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMFactoryTests.java
+++ 
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMFactoryTests.java
@@ -20,6 +20,7 @@ package org.apache.axiom.ts.om.factory;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.assertj.core.api.Assertions.tuple;
 
 import com.google.inject.Inject;
 import javax.xml.namespace.QName;
@@ -236,6 +237,17 @@ public class OMFactoryTests {
         assertThat(text.getParent()).isNull();
     }
 
+    @Test
+    public void createOMTextFromQName() {
+        OMElement element = factory.createOMElement("test", null);
+        OMText text = factory.createOMText(element, new QName("urn:test", 
"foobar", "p"));
+        assertThat(text.getText()).isEqualTo("p:foobar");
+        assertThat(element.getAllDeclaredNamespaces())
+                .toIterable()
+                .extracting(OMNamespace::getPrefix, 
OMNamespace::getNamespaceURI)
+                .containsExactly(tuple("p", "urn:test"));
+    }
+
     /**
      * Tests that the {@link OMFactory} returned by {@link OMMetaFactory} is a 
singleton. More precisely
      * this unit test checks that subsequent calls to {@link 
OMMetaFactory#getOMFactory()} return the

Reply via email to