Merge pull request #478 from olegz/INT-2516

This commit is contained in:
Gary Russell
2012-06-07 11:33:15 -04:00

View File

@@ -296,6 +296,8 @@ abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewaySuppor
}
}
}
this.validateSupportedMethods();
}
/**
@@ -512,4 +514,17 @@ abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewaySuppor
}
return evaluationContext;
}
private void validateSupportedMethods() {
if (this.requestPayloadType != null){
for (HttpMethod httpMethod : this.supportedMethods) {
if (HttpMethod.GET.equals(httpMethod) || HttpMethod.HEAD.equals(httpMethod) || HttpMethod.OPTIONS.equals(httpMethod)){
if (logger.isWarnEnabled()){
logger.warn("The 'requestPayloadType' attribute will have no relevance for one of the specified HTTP methods '" +
httpMethod + "'");
}
}
}
}
}
}