Commit e91b8386 by Johannes Edmeier

Polish

parent 6fdaf8c1
......@@ -16,6 +16,7 @@
package spring.boot.admin.turbine.config;
import java.net.URI;
import java.util.Arrays;
import org.springframework.boot.context.properties.ConfigurationProperties;
......@@ -43,7 +44,7 @@ public class TurbineProperties {
}
public void setClusters(String[] clusters) {
this.clusters = clusters;
this.clusters = Arrays.copyOf(clusters, clusters.length);
}
public boolean isEnabled() {
......
package de.codecentric.boot.admin.config;
import java.util.Arrays;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties("spring.boot.admin")
......@@ -76,7 +78,7 @@ public class AdminServerProperties {
}
public void setEndpoints(String[] endpoints) {
this.endpoints = endpoints;
this.endpoints = Arrays.copyOf(endpoints, endpoints.length);
}
}
}
......@@ -56,9 +56,10 @@ public class RegistryController {
*/
@RequestMapping(method = RequestMethod.POST)
public ResponseEntity<Application> register(@RequestBody Application application) {
application = Application.copyOf(application).withSource("http-api").build();
LOGGER.debug("Register application {}", application.toString());
Application registeredApp = registry.register(application);
Application applicationWithSource = Application.copyOf(application).withSource("http-api")
.build();
LOGGER.debug("Register application {}", applicationWithSource.toString());
Application registeredApp = registry.register(applicationWithSource);
return ResponseEntity.status(HttpStatus.CREATED).body(registeredApp);
}
......
......@@ -83,7 +83,7 @@ public class CompositeRouteLocatorTest {
private Collection<String> ignoredPaths;
private List<Route> routes;
public TestRouteLocator(Collection<String> ignoredPaths, List<Route> routes) {
private TestRouteLocator(Collection<String> ignoredPaths, List<Route> routes) {
this.ignoredPaths = ignoredPaths;
this.routes = routes;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment