From ddcb5ee328941dbbc65ee2852f7a9ec305582e30 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 4 Apr 2017 09:36:15 -0700 Subject: [PATCH] Polish --- .../actuate/autoconfigure/ManagementServerProperties.java | 5 +++-- .../boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java | 2 +- .../actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java | 5 +++-- .../cache/HazelcastJCacheCustomizationConfiguration.java | 7 +++---- .../src/test/resources/hazelcast.xml | 8 ++------ .../boot/web/security/UnauthenticatedAccessExample.java | 1 + .../springframework/boot/loader/tools/LayoutsTests.java | 2 +- .../boot/loader/data/RandomAccessDataFileTests.java | 2 +- .../jetty/JettyEmbeddedServletContainerFactoryTests.java | 2 +- 9 files changed, 16 insertions(+), 18 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java index d94e33b4b59..84c5cbed243 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java @@ -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. @@ -170,7 +170,8 @@ public class ManagementServerProperties implements SecurityPrerequisite { /** * Comma-separated list of roles that can access the management endpoint. */ - private List roles = new ArrayList(Collections.singletonList("ADMIN")); + private List roles = new ArrayList( + Collections.singletonList("ADMIN")); /** * Session creating policy for security use (always, never, if_required, diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java index 465af6dd356..04c7264b923 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java @@ -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. diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java index 82701d0a36f..3683f056005 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java @@ -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. @@ -103,7 +103,8 @@ public class EnvironmentMvcEndpointTests { } @Test - public void nestedPathWhenPlaceholderCannotBeResolvedShouldReturnUnresolvedProperty() throws Exception { + public void nestedPathWhenPlaceholderCannotBeResolvedShouldReturnUnresolvedProperty() + throws Exception { Map map = new HashMap(); map.put("my.foo", "${my.bar}"); ((ConfigurableEnvironment) this.context.getEnvironment()).getPropertySources() diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastJCacheCustomizationConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastJCacheCustomizationConfiguration.java index 8de78bb5103..d86f7e53208 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastJCacheCustomizationConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastJCacheCustomizationConfiguration.java @@ -40,8 +40,7 @@ class HazelcastJCacheCustomizationConfiguration { @Bean public HazelcastPropertiesCustomizer hazelcastPropertiesCustomizer( ObjectProvider hazelcastInstance) { - return new HazelcastPropertiesCustomizer( - hazelcastInstance.getIfUnique()); + return new HazelcastPropertiesCustomizer(hazelcastInstance.getIfUnique()); } private static class HazelcastPropertiesCustomizer @@ -75,8 +74,8 @@ class HazelcastJCacheCustomizationConfiguration { return config.getURI(); } catch (IOException ex) { - throw new IllegalArgumentException( - "Could not get URI from " + config, ex); + throw new IllegalArgumentException("Could not get URI from " + config, + ex); } } diff --git a/spring-boot-autoconfigure/src/test/resources/hazelcast.xml b/spring-boot-autoconfigure/src/test/resources/hazelcast.xml index 4fe3006b2e0..3b13fe20eec 100644 --- a/spring-boot-autoconfigure/src/test/resources/hazelcast.xml +++ b/spring-boot-autoconfigure/src/test/resources/hazelcast.xml @@ -1,10 +1,6 @@ - + xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.6.xsd" + xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> default-instance - - diff --git a/spring-boot-docs/src/main/java/org/springframework/boot/web/security/UnauthenticatedAccessExample.java b/spring-boot-docs/src/main/java/org/springframework/boot/web/security/UnauthenticatedAccessExample.java index 43917375e93..494c2ff095e 100644 --- a/spring-boot-docs/src/main/java/org/springframework/boot/web/security/UnauthenticatedAccessExample.java +++ b/spring-boot-docs/src/main/java/org/springframework/boot/web/security/UnauthenticatedAccessExample.java @@ -46,6 +46,7 @@ public class UnauthenticatedAccessExample { protected void configure(HttpSecurity http) throws Exception { http.antMatcher("/**").authorizeRequests().anyRequest().authenticated(); } + } // end::configuration[] diff --git a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayoutsTests.java b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayoutsTests.java index e3fa328cfc5..83ef99095c2 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayoutsTests.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayoutsTests.java @@ -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. diff --git a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java index 1f5dd7eff19..200a1f562f2 100644 --- a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java +++ b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java @@ -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. diff --git a/spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java b/spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java index def6a3f8bdc..3744f69aafa 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java @@ -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.