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:59:35 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/a6b710e8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a6b710e8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a6b710e8

Branch: refs/heads/camel-2.16.x
Commit: a6b710e8da903469a5cc89bc5940004b9ecd036d
Parents: a019505
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:49:53 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/a6b710e8/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 005aaed..330bbe9 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
@@ -40,12 +40,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