DATAREST-1421 - Polishing.
This commit is contained in:
@@ -76,7 +76,7 @@ public class AlpsController {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setAllow(Collections.singleton(HttpMethod.GET));
|
||||
|
||||
return new ResponseEntity<Object>(headers, HttpStatus.OK);
|
||||
return new ResponseEntity<>(headers, HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,7 +91,7 @@ public class AlpsController {
|
||||
|
||||
verifyAlpsEnabled();
|
||||
|
||||
return new ResponseEntity<RootResourceInformation>(information, HttpStatus.OK);
|
||||
return new ResponseEntity<>(information, HttpStatus.OK);
|
||||
}
|
||||
|
||||
private void verifyAlpsEnabled() {
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
* {@code application/alps+json}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Greg Turnquist
|
||||
*/
|
||||
public class AlpsJsonHttpMessageConverter extends MappingJackson2HttpMessageConverter
|
||||
implements ResponseBodyAdvice<Object> {
|
||||
@@ -102,7 +103,8 @@ public class AlpsJsonHttpMessageConverter extends MappingJackson2HttpMessageConv
|
||||
ServerHttpResponse response) {
|
||||
|
||||
return body instanceof RootResourceInformation
|
||||
? Collections.singletonMap("alps", converter.convert((RootResourceInformation) body)) : body;
|
||||
? Collections.singletonMap("alps", converter.convert((RootResourceInformation) body))
|
||||
: body;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user