Skip to content

Commit

Permalink
[bugfix] no error logged on qname of CDATA section
Browse files Browse the repository at this point in the history
fixes eXist-db#4740

Do not log an error each time typeswitch is called on a CDATA section.
  • Loading branch information
line-o committed Feb 11, 2023
1 parent 3f9a9dc commit 2b912fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion exist-core/src/main/java/org/exist/dom/QName.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class QName implements Comparable<QName> {
public static final QName TEXT_QNAME = EMPTY_QNAME;
public static final QName COMMENT_QNAME = EMPTY_QNAME;
public static final QName DOCTYPE_QNAME = EMPTY_QNAME;

public static final QName CDATA_SECTION_QNAME = EMPTY_QNAME;

private final String localPart;
private final String namespaceURI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ public QName getQName() {
return QName.COMMENT_QNAME;
case Node.DOCUMENT_TYPE_NODE:
return QName.DOCTYPE_QNAME;
case Node.CDATA_SECTION_NODE:
return QName.CDATA_SECTION_QNAME;
default:
LOG.error("Unknown node type: {}", getNodeType());
return null;
Expand Down

0 comments on commit 2b912fc

Please sign in to comment.