Skip to content

Commit

Permalink
Slight performance optimization
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1423130 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Dec 17, 2012
1 parent 6862768 commit e77fccc
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ protected MessageContentsList getParameters(Message message, BindingOperationInf

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)) {
Expand Down Expand Up @@ -227,10 +228,11 @@ protected MessageContentsList getParameters(Message message, BindingOperationInf
// 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);

Expand Down

0 comments on commit e77fccc

Please sign in to comment.