You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/12/17 21:38:40 UTC

svn commit: r1423130 - /cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java

Author: dkulp
Date: Mon Dec 17 20:38:39 2012
New Revision: 1423130

URL: http://svn.apache.org/viewvc?rev=1423130&view=rev
Log:
Slight performance optimization

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java?rev=1423130&r1=1423129&r2=1423130&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java Mon Dec 17 20:38:39 2012
@@ -194,7 +194,8 @@ public class URIMappingInterceptor exten
         
         Class<?>[] types = method.getParameterTypes();        
         
-        for (String key : queries.keySet()) {
+        for (Map.Entry<String, String> ent : queries.entrySet()) {
+            String key = ent.getKey();
             MessagePartInfo inf = null;
             for (MessagePartInfo p : operation.getOperationInfo().getInput().getMessageParts()) {
                 if (p.getConcreteName().getLocalPart().equals(key)) {
@@ -227,10 +228,11 @@ public class URIMappingInterceptor exten
             // TODO check the parameter name here
             Object param = null;
                         
-            if (type.isPrimitive() && queries.get(key) != null) {
-                param = PrimitiveUtils.read(queries.get(key), type);
+            String val = ent.getValue();
+            if (type.isPrimitive() && val != null) {
+                param = PrimitiveUtils.read(val, type);
             } else {
-                param = readType(queries.get(key), type);
+                param = readType(val, type);
             }
             parameters.set(idx, param);