Skip to content

Commit

Permalink
Merge branch 'master' into i179.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Feb 5, 2024
2 parents e4e1360 + 970eb80 commit aa56063
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/ctc/wstx/compat/QNameCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class QNameCreator

public static QName create(String uri, String localName, String prefix)
{
if (_helper == null) { // can't use 3-arg constructor; but 2-arg will be there
if (_helper == null || prefix == null) { // can't use 3-arg constructor; but 2-arg will be there
return new QName(uri, localName);
}
return _helper.create(uri, localName, prefix);
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/ctc/wstx/sw/SimpleOutputElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,10 @@ public String getNamespaceURI() {
}

public QName getName() {
if (mPrefix != null) {
return QNameCreator.create(mURI, mLocalName, mPrefix);
} else {
if (mPrefix == null) {
return new QName(mURI, mLocalName);
}
return QNameCreator.create(mURI, mLocalName, mPrefix);
}

/*
Expand Down

0 comments on commit aa56063

Please sign in to comment.