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:06:22 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.6.x-fixes 3da3216d4 -> 12ece5cc7


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/12ece5cc
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/12ece5cc
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/12ece5cc

Branch: refs/heads/2.6.x-fixes
Commit: 12ece5cc7e141615bc47ef5052b5e55a6c44c72c
Parents: 3da3216
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:05:57 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/12ece5cc/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