mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Fix formatting
This commit is contained in:
parent
27c8da66f1
commit
ef1401fcc9
@ -94,7 +94,7 @@ class CloudFoundryWebEndpointServletHandlerMapping extends AbstractWebMvcEndpoin
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Map<String, Map<String, Link>> links(HttpServletRequest request, HttpServletResponse response) {
|
public Map<String, Map<String, Link>> links(HttpServletRequest request, HttpServletResponse response) {
|
||||||
SecurityResponse securityResponse = CloudFoundryWebEndpointServletHandlerMapping.this.securityInterceptor
|
SecurityResponse securityResponse = CloudFoundryWebEndpointServletHandlerMapping.this.securityInterceptor
|
||||||
.preHandle(request, null);
|
.preHandle(request, null);
|
||||||
if (!securityResponse.getStatus().equals(HttpStatus.OK)) {
|
if (!securityResponse.getStatus().equals(HttpStatus.OK)) {
|
||||||
sendFailureResponse(response, securityResponse);
|
sendFailureResponse(response, securityResponse);
|
||||||
}
|
}
|
||||||
@ -104,11 +104,10 @@ class CloudFoundryWebEndpointServletHandlerMapping extends AbstractWebMvcEndpoin
|
|||||||
return Collections.singletonMap("_links", filteredLinks);
|
return Collections.singletonMap("_links", filteredLinks);
|
||||||
}
|
}
|
||||||
Map<String, Link> links = CloudFoundryWebEndpointServletHandlerMapping.this.linksResolver
|
Map<String, Link> links = CloudFoundryWebEndpointServletHandlerMapping.this.linksResolver
|
||||||
.resolveLinks(request.getRequestURL().toString());
|
.resolveLinks(request.getRequestURL().toString());
|
||||||
filteredLinks = links.entrySet()
|
filteredLinks = links.entrySet().stream()
|
||||||
.stream()
|
.filter((e) -> e.getKey().equals("self") || accessLevel.isAccessAllowed(e.getKey()))
|
||||||
.filter((e) -> e.getKey().equals("self") || accessLevel.isAccessAllowed(e.getKey()))
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
|
||||||
return Collections.singletonMap("_links", filteredLinks);
|
return Collections.singletonMap("_links", filteredLinks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user