Cleanup and format code
This commit is contained in:
@@ -78,7 +78,7 @@ public class EndpointDocumentation {
|
||||
static final File LOG_FILE = new File("target/logs/spring.log");
|
||||
|
||||
private static final Set<String> SKIPPED = Collections
|
||||
.<String>unmodifiableSet(new HashSet<String>(
|
||||
.<String>unmodifiableSet(new HashSet<>(
|
||||
Arrays.asList("/docs", "/logfile", "/heapdump", "/auditevents")));
|
||||
|
||||
@Autowired
|
||||
@@ -161,8 +161,8 @@ public class EndpointDocumentation {
|
||||
@Test
|
||||
public void endpoints() throws Exception {
|
||||
final File docs = new File("src/main/asciidoc");
|
||||
final Map<String, Object> model = new LinkedHashMap<String, Object>();
|
||||
final List<EndpointDoc> endpoints = new ArrayList<EndpointDoc>();
|
||||
final Map<String, Object> model = new LinkedHashMap<>();
|
||||
final List<EndpointDoc> endpoints = new ArrayList<>();
|
||||
model.put("endpoints", endpoints);
|
||||
for (MvcEndpoint endpoint : getEndpoints()) {
|
||||
final String endpointPath = (StringUtils.hasText(endpoint.getPath())
|
||||
@@ -200,7 +200,7 @@ public class EndpointDocumentation {
|
||||
}
|
||||
|
||||
private Collection<? extends MvcEndpoint> getEndpoints() {
|
||||
List<? extends MvcEndpoint> endpoints = new ArrayList<MvcEndpoint>(
|
||||
List<? extends MvcEndpoint> endpoints = new ArrayList<>(
|
||||
this.mvcEndpoints.getEndpoints());
|
||||
Collections.sort(endpoints, new Comparator<MvcEndpoint>() {
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,8 +39,8 @@ public class LimitedEnvironmentEndpoint extends EnvironmentEndpoint {
|
||||
private static final MultiValueMap<String, String> INCLUDES;
|
||||
|
||||
static {
|
||||
Map<String, List<String>> includes = new LinkedHashMap<String, List<String>>();
|
||||
List<String> systemProperties = new ArrayList<String>();
|
||||
Map<String, List<String>> includes = new LinkedHashMap<>();
|
||||
List<String> systemProperties = new ArrayList<>();
|
||||
systemProperties.add("java.runtime.name");
|
||||
systemProperties.add("sun.boot.library.path");
|
||||
systemProperties.add("java.vendor.url");
|
||||
@@ -61,14 +61,13 @@ public class LimitedEnvironmentEndpoint extends EnvironmentEndpoint {
|
||||
systemProperties.add("java.vendor");
|
||||
systemProperties.add("file.separator");
|
||||
includes.put("systemProperties", systemProperties);
|
||||
List<String> systemEnvironment = new ArrayList<String>();
|
||||
List<String> systemEnvironment = new ArrayList<>();
|
||||
systemEnvironment.add("SHELL");
|
||||
systemEnvironment.add("TMPDIR");
|
||||
systemEnvironment.add("DISPLAY");
|
||||
systemEnvironment.add("LOGNAME");
|
||||
includes.put("systemEnvironment", systemEnvironment);
|
||||
INCLUDES = new LinkedMultiValueMap<String, String>(
|
||||
Collections.unmodifiableMap(includes));
|
||||
INCLUDES = new LinkedMultiValueMap<>(Collections.unmodifiableMap(includes));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user