From f4f668a52b5624d3821b39f84a360ac5c8290304 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 25 Nov 2013 17:12:56 -0800 Subject: [PATCH] Polish --- spring-boot-actuator/pom.xml | 6 +++--- .../boot/actuate/autoconfigure/CrshAutoConfiguration.java | 1 - .../PropertyPlaceholderAutoConfigurationTests.java | 2 ++ .../boot/cli/compiler/RepositoryConfigurationFactory.java | 2 ++ spring-boot-dependencies/pom.xml | 8 ++++---- .../sample/profile/SampleProfileApplicationTests.java | 3 ++- .../boot/bind/PropertiesConfigurationFactory.java | 1 - .../org/springframework/boot/bind/RelaxedDataBinder.java | 1 - .../java/org/springframework/boot/bind/RelaxedNames.java | 2 +- .../jetty/JettyEmbeddedServletContainerFactory.java | 2 +- .../tomcat/TomcatEmbeddedServletContainerFactory.java | 2 +- 11 files changed, 16 insertions(+), 14 deletions(-) diff --git a/spring-boot-actuator/pom.xml b/spring-boot-actuator/pom.xml index b1ce2751e4d..1f3579a2ff6 100644 --- a/spring-boot-actuator/pom.xml +++ b/spring-boot-actuator/pom.xml @@ -65,7 +65,7 @@ org.springframework.security spring-security-config - true + true org.apache.tomcat.embed @@ -79,9 +79,9 @@ org.jolokia - jolokia-core + jolokia-core true - + org.springframework diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java index 5c4aa578ace..76cf60a7e0d 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java @@ -374,7 +374,6 @@ public class CrshAutoConfiguration { return plugins; } - @SuppressWarnings("rawtypes") protected boolean isEnabled(CRaSHPlugin plugin) { Assert.notNull(plugin, "Plugin must not be null"); diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/PropertyPlaceholderAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/PropertyPlaceholderAutoConfigurationTests.java index 2eea122c4c7..d3aa2a0c5be 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/PropertyPlaceholderAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/PropertyPlaceholderAutoConfigurationTests.java @@ -29,6 +29,8 @@ import org.springframework.util.StringUtils; import static org.junit.Assert.assertEquals; /** + * Tests for {@link PropertyPlaceholderAutoConfiguration}. + * * @author Dave Syer */ public class PropertyPlaceholderAutoConfigurationTests { diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java index 8e8f04d0731..d0c62fa0600 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java @@ -23,6 +23,8 @@ import java.util.List; import org.springframework.boot.cli.compiler.grape.RepositoryConfiguration; /** + * Factory used to create {@link RepositoryConfiguration}s. + * * @author Andy Wilkinson * @author Dave Syer */ diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml index fa536c5e95a..9c581d02378 100644 --- a/spring-boot-dependencies/pom.xml +++ b/spring-boot-dependencies/pom.xml @@ -531,10 +531,10 @@ ${crashub.version} - org.jolokia - jolokia-core - ${jolokia.version} - + org.jolokia + jolokia-core + ${jolokia.version} + diff --git a/spring-boot-samples/spring-boot-sample-profile/src/test/java/org/springframework/boot/sample/profile/SampleProfileApplicationTests.java b/spring-boot-samples/spring-boot-sample-profile/src/test/java/org/springframework/boot/sample/profile/SampleProfileApplicationTests.java index 8b34c98342c..bd666bbe663 100644 --- a/spring-boot-samples/spring-boot-sample-profile/src/test/java/org/springframework/boot/sample/profile/SampleProfileApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-profile/src/test/java/org/springframework/boot/sample/profile/SampleProfileApplicationTests.java @@ -40,7 +40,8 @@ public class SampleProfileApplicationTests { public void after() { if (this.profiles != null) { System.setProperty("spring.profiles.active", this.profiles); - } else { + } + else { System.clearProperty("spring.profiles.active"); } } diff --git a/spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java b/spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java index c241f38ef69..370405635ea 100644 --- a/spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java +++ b/spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java @@ -99,7 +99,6 @@ public class PropertiesConfigurationFactory implements FactoryBean, * Flag to disable binding of nested properties (i.e. those with period separators in * their paths). Can be useful to disable this if the name prefix is empty and you * don't want to ignore unknown fields. - * * @param ignoreNestedProperties the flag to set (default false) */ public void setIgnoreNestedProperties(boolean ignoreNestedProperties) { diff --git a/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedDataBinder.java b/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedDataBinder.java index 4c972bee2c8..e563dbabaf9 100644 --- a/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedDataBinder.java +++ b/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedDataBinder.java @@ -75,7 +75,6 @@ public class RelaxedDataBinder extends DataBinder { * Flag to disable binding of nested properties (i.e. those with period separators in * their paths). Can be useful to disable this if the name prefix is empty and you * don't want to ignore unknown fields. - * * @param ignoreNestedProperties the flag to set (default false) */ public void setIgnoreNestedProperties(boolean ignoreNestedProperties) { diff --git a/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedNames.java b/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedNames.java index d7970b3c318..4af72b62fe5 100644 --- a/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedNames.java +++ b/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedNames.java @@ -43,7 +43,7 @@ public final class RelaxedNames implements Iterable { * using dashed notation (e.g. {@literal my-property-name} */ public RelaxedNames(String name) { - this.name = name == null ? "" : name; + this.name = (name == null ? "" : name); initialize(RelaxedNames.this.name, this.values); } diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactory.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactory.java index 2df5413a261..49282a36c9b 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactory.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactory.java @@ -97,7 +97,7 @@ public class JettyEmbeddedServletContainerFactory extends public EmbeddedServletContainer getEmbeddedServletContainer( ServletContextInitializer... initializers) { WebAppContext context = new WebAppContext(); - int port = getPort() >= 0 ? getPort() : 0; + int port = (getPort() >= 0 ? getPort() : 0); Server server = new Server(new InetSocketAddress(getAddress(), port)); if (this.resourceLoader != null) { diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java index bd746e8f180..4c8bd5e8ed8 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java @@ -193,7 +193,7 @@ public class TomcatEmbeddedServletContainerFactory extends // Needs to be protected so it can be used by subclasses protected void customizeConnector(Connector connector) { - int port = getPort() >= 0 ? getPort() : 0; + int port = (getPort() >= 0 ? getPort() : 0); connector.setPort(port); if (connector.getProtocolHandler() instanceof AbstractProtocol) { if (getAddress() != null) {