This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 6d0b4e63da4 (chores) camel-xml-io-util: use isEmpty (#11009)
6d0b4e63da4 is described below
commit 6d0b4e63da425d00229beb1f4441c03a63944d8a
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Sat Aug 5 14:42:07 2023 +0200
(chores) camel-xml-io-util: use isEmpty (#11009)
---
.../src/main/java/org/apache/camel/xml/io/util/XmlStreamDetector.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/core/camel-xml-io-util/src/main/java/org/apache/camel/xml/io/util/XmlStreamDetector.java
b/core/camel-xml-io-util/src/main/java/org/apache/camel/xml/io/util/XmlStreamDetector.java
index f795c11abdc..55830692ec1 100644
---
a/core/camel-xml-io-util/src/main/java/org/apache/camel/xml/io/util/XmlStreamDetector.java
+++
b/core/camel-xml-io-util/src/main/java/org/apache/camel/xml/io/util/XmlStreamDetector.java
@@ -127,7 +127,7 @@ public class XmlStreamDetector {
String nsURI = qn.getNamespaceURI() == null ? "" :
qn.getNamespaceURI().trim();
String value = reader.getAttributeValue(at);
String localPart = qn.getLocalPart();
- if ("".equals(nsURI) || "".equals(prefix)) {
+ if (nsURI.isEmpty() || prefix.isEmpty()) {
// according to XML spec, this attribut is not
namespaced, not in default namespace
// https://www.w3.org/TR/xml-names/#defaulting
// > The namespace name for an unprefixed
attribute name always has no value.