cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1442077 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
Date Mon, 04 Feb 2013 11:15:55 GMT
Author: sergeyb
Date: Mon Feb  4 11:15:55 2013
New Revision: 1442077

URL: http://svn.apache.org/viewvc?rev=1442077&view=rev
Log:
Minor optimization to JAXRSUtils

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1442077&r1=1442076&r2=1442077&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Mon
Feb  4 11:15:55 2013
@@ -720,38 +720,36 @@ public final class JAXRSUtils {
             defaultValue = ori.getDefaultParameterValue();
         }
         
-        Object result = null;
-        
         if (parameter.getType() == ParameterType.PATH) {
-            result = readFromUriParam(message, parameter.getName(), parameterClass, genericParam,
+            return readFromUriParam(message, parameter.getName(), parameterClass, genericParam,
                                       paramAnns, values, defaultValue, !isEncoded);
         } 
         
         if (parameter.getType() == ParameterType.QUERY) {
-            result = readQueryString(parameter.getName(), parameterClass, genericParam, 
+            return readQueryString(parameter.getName(), parameterClass, genericParam, 
                                      paramAnns, message, defaultValue, !isEncoded);
         }
         
         if (parameter.getType() == ParameterType.MATRIX) {
-            result = processMatrixParam(message, parameter.getName(), parameterClass, genericParam,
+            return processMatrixParam(message, parameter.getName(), parameterClass, genericParam,
                                         paramAnns, defaultValue, !isEncoded);
         }
         
         if (parameter.getType() == ParameterType.FORM) {
-            result = processFormParam(message, parameter.getName(), parameterClass, genericParam,

+            return processFormParam(message, parameter.getName(), parameterClass, genericParam,

                                       paramAnns, defaultValue, !isEncoded);
         }
         
         if (parameter.getType() == ParameterType.COOKIE) {
-            result = processCookieParam(message, parameter.getName(), parameterClass, genericParam,
+            return processCookieParam(message, parameter.getName(), parameterClass, genericParam,
                                         paramAnns, defaultValue);
         } 
         
+        Object result = null;
         if (parameter.getType() == ParameterType.HEADER) {
             result = processHeaderParam(message, parameter.getName(), parameterClass, genericParam,
                                         paramAnns, defaultValue);
-        } 
-
+        }
         return result;
     }
     



Mime
View raw message