headersWithNullValues.add(header.toLowerCase());
}
}
for (int i = 0; i < args.length; ++i) {
RescriptParamBindingDescriptor descriptor = paramBindings[i];
Parameter param = operationDefinition.getParameters()[i];
switch (descriptor.getSource()) {
case HEADER :
String key = descriptor.getName();
args[i] = resolveArgument(headersWithNullValues.contains(key.toLowerCase()) ? "" : request.getHeader(key), param, descriptor);
break;
case QUERY :
args[i] = resolveArgument(request.getParameter(descriptor.getName()), param, descriptor);
break;
case BODY :
if (body != null) {
args[i] = body.getValue(descriptor.getName());
// non-null enums get stored as their raw string value so need converting to the true enum value
if (param.getParameterType().getType() == ParameterType.Type.ENUM) {
if (args[i] != null) {
args[i] = EnumUtils.readEnum(param.getParameterType().getImplementationClass(), (String) args[i]);
}
}
}
break;
default :