DATAREST-60 Only set the errback parameter if one is configured in the RepositoryRestConfiguration.

This commit is contained in:
Jon Brisbin
2013-01-22 10:02:20 -06:00
committed by Jon Brisbin
parent f4945a61bb
commit 9f082f00fd

View File

@@ -244,7 +244,9 @@ public class AbstractRepositoryRestController implements ApplicationContextAware
HttpHeaders headers,
HttpStatus status) {
String callback = repoRequest.getRequest().getParameter(config.getJsonpParamName());
String errback = repoRequest.getRequest().getParameter(config.getJsonpOnErrParamName());
String errback = (null != config.getJsonpOnErrParamName()
? repoRequest.getRequest().getParameter(config.getJsonpOnErrParamName())
: null);
ResponseEntity<T> newResponse;
if(null != headers) {
newResponse = new ResponseEntity<T>(response, headers, status);