INT-1124 relying on $ with MapAccessor after upgrade to Spring 3.0.3

This commit is contained in:
Mark Fisher
2010-06-16 15:58:42 +00:00
parent 7e253449fa
commit 7ba407defe

View File

@@ -434,15 +434,9 @@ public class MethodInvokingMessageProcessor extends AbstractMessageProcessor {
}
Assert.notNull(headerName, "Cannot determine header name. Possible reasons: -debug is " +
"disabled or header name is not explicitly provided via @Header annotation.");
if (headerName.startsWith("$")) {
// rely on access to getSomeValue for $someValue
headerName = headerName.substring(1);
}
String headerExpression = "headers." + headerName + relativeExpression;
if (headerAnnotation.required()) {
return headerExpression;
}
return "headers['" + headerName + "'] != null ? " + headerExpression + " : null";
return (headerAnnotation.required()) ? headerExpression
: "headers['" + headerName + "'] != null ? " + headerExpression + " : null";
}
private synchronized void setExclusiveTargetParameterType(Class<?> targetParameterType) {