You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ay...@apache.org on 2016/04/15 21:34:56 UTC
[2/2] camel git commit: a minor simplification to CAMEL-9854
a minor simplification to CAMEL-9854
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0ee67aa3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0ee67aa3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0ee67aa3
Branch: refs/heads/master
Commit: 0ee67aa367b8054445924e4f956188c40b3ddbdd
Parents: a37eccc
Author: Akitoshi Yoshida <ay...@apache.org>
Authored: Tue Apr 12 14:40:11 2016 +0200
Committer: Akitoshi Yoshida <ay...@apache.org>
Committed: Fri Apr 15 21:32:39 2016 +0200
----------------------------------------------------------------------
.../component/cxf/converter/DelegatingXMLStreamReader.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0ee67aa3/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/DelegatingXMLStreamReader.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/DelegatingXMLStreamReader.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/DelegatingXMLStreamReader.java
index 408f8f2..47c081c 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/DelegatingXMLStreamReader.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/DelegatingXMLStreamReader.java
@@ -37,12 +37,10 @@ class DelegatingXMLStreamReader implements XMLStreamReader {
public DelegatingXMLStreamReader(XMLStreamReader reader, Map<String, String> nsmap) {
this.reader = reader;
+ //the original nsmap will be mutated if some of its declarations are redundantly present at the current reader
Set<String> prefixes = nsmap.keySet();
for (int i = 0; i < reader.getNamespaceCount(); i++) {
- String prefix = reader.getNamespacePrefix(i);
- if (prefixes.contains(prefix)) {
- prefixes.remove(prefix);
- }
+ prefixes.remove(reader.getNamespacePrefix(i));
}
this.xprefixes = prefixes.toArray(new String[0]);
}