cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject git commit: a minor cond-exp fix in QNamesMap.get()
Date Fri, 23 May 2014 12:04:19 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 8d3e92924 -> b73d9c941


a minor cond-exp fix in QNamesMap.get()


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b73d9c94
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b73d9c94
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b73d9c94

Branch: refs/heads/2.7.x-fixes
Commit: b73d9c941ea97e1fa0c22a614ec7335cebf39d6f
Parents: 8d3e929
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Fri May 23 13:58:28 2014 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Fri May 23 14:03:49 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/cxf/staxutils/transform/QNamesMap.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b73d9c94/api/src/main/java/org/apache/cxf/staxutils/transform/QNamesMap.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/staxutils/transform/QNamesMap.java b/api/src/main/java/org/apache/cxf/staxutils/transform/QNamesMap.java
index 5988c1b..87f474d 100644
--- a/api/src/main/java/org/apache/cxf/staxutils/transform/QNamesMap.java
+++ b/api/src/main/java/org/apache/cxf/staxutils/transform/QNamesMap.java
@@ -43,9 +43,9 @@ class QNamesMap {
                 if (keys[i].getLocalPart().equals(key.getLocalPart())) {
                     return values[i];
                 } else if ("*".equals(keys[i].getLocalPart())) {
-                    // assume it is something like {somens}* : *
-                    return "*".equals(values[i]) ? new QName(key.getLocalPart()) 
-                        : new QName(values[i].getNamespaceURI(), key.getLocalPart());
+                    // assume it is something like {somens}* => * or {somens}* => {anotherns}*
+                    // and return QName(nsuri, lcname) which covers both cases.
+                    return new QName(values[i].getNamespaceURI(), key.getLocalPart());
                 }
             }
         }


Mime
View raw message