camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [2/2] camel git commit: a minor simplification to CAMEL-9854
Date Fri, 15 Apr 2016 19:36:23 GMT
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/713ce06c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/713ce06c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/713ce06c

Branch: refs/heads/camel-2.17.x
Commit: 713ce06cea86cef2d4aa248d3d8a05b09c286632
Parents: bed3682
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:35:56 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/713ce06c/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]);
     }


Mime
View raw message