Browse Source

Polish

pull/138/head
Phillip Webb 12 years ago
parent
commit
f4f668a52b
  1. 6
      spring-boot-actuator/pom.xml
  2. 1
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java
  3. 2
      spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/PropertyPlaceholderAutoConfigurationTests.java
  4. 2
      spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java
  5. 8
      spring-boot-dependencies/pom.xml
  6. 3
      spring-boot-samples/spring-boot-sample-profile/src/test/java/org/springframework/boot/sample/profile/SampleProfileApplicationTests.java
  7. 1
      spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java
  8. 1
      spring-boot/src/main/java/org/springframework/boot/bind/RelaxedDataBinder.java
  9. 2
      spring-boot/src/main/java/org/springframework/boot/bind/RelaxedNames.java
  10. 2
      spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactory.java
  11. 2
      spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java

6
spring-boot-actuator/pom.xml

@ -65,7 +65,7 @@
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId> <artifactId>spring-security-config</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.tomcat.embed</groupId> <groupId>org.apache.tomcat.embed</groupId>
@ -79,9 +79,9 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jolokia</groupId> <groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId> <artifactId>jolokia-core</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<!-- Test --> <!-- Test -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>

1
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java

@ -374,7 +374,6 @@ public class CrshAutoConfiguration {
return plugins; return plugins;
} }
@SuppressWarnings("rawtypes")
protected boolean isEnabled(CRaSHPlugin<?> plugin) { protected boolean isEnabled(CRaSHPlugin<?> plugin) {
Assert.notNull(plugin, "Plugin must not be null"); Assert.notNull(plugin, "Plugin must not be null");

2
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; import static org.junit.Assert.assertEquals;
/** /**
* Tests for {@link PropertyPlaceholderAutoConfiguration}.
*
* @author Dave Syer * @author Dave Syer
*/ */
public class PropertyPlaceholderAutoConfigurationTests { public class PropertyPlaceholderAutoConfigurationTests {

2
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; import org.springframework.boot.cli.compiler.grape.RepositoryConfiguration;
/** /**
* Factory used to create {@link RepositoryConfiguration}s.
*
* @author Andy Wilkinson * @author Andy Wilkinson
* @author Dave Syer * @author Dave Syer
*/ */

8
spring-boot-dependencies/pom.xml

@ -531,10 +531,10 @@
<version>${crashub.version}</version> <version>${crashub.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jolokia</groupId> <groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId> <artifactId>jolokia-core</artifactId>
<version>${jolokia.version}</version> <version>${jolokia.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<build> <build>

3
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() { public void after() {
if (this.profiles != null) { if (this.profiles != null) {
System.setProperty("spring.profiles.active", this.profiles); System.setProperty("spring.profiles.active", this.profiles);
} else { }
else {
System.clearProperty("spring.profiles.active"); System.clearProperty("spring.profiles.active");
} }
} }

1
spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java

@ -99,7 +99,6 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
* Flag to disable binding of nested properties (i.e. those with period separators in * 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 * their paths). Can be useful to disable this if the name prefix is empty and you
* don't want to ignore unknown fields. * don't want to ignore unknown fields.
*
* @param ignoreNestedProperties the flag to set (default false) * @param ignoreNestedProperties the flag to set (default false)
*/ */
public void setIgnoreNestedProperties(boolean ignoreNestedProperties) { public void setIgnoreNestedProperties(boolean ignoreNestedProperties) {

1
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 * 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 * their paths). Can be useful to disable this if the name prefix is empty and you
* don't want to ignore unknown fields. * don't want to ignore unknown fields.
*
* @param ignoreNestedProperties the flag to set (default false) * @param ignoreNestedProperties the flag to set (default false)
*/ */
public void setIgnoreNestedProperties(boolean ignoreNestedProperties) { public void setIgnoreNestedProperties(boolean ignoreNestedProperties) {

2
spring-boot/src/main/java/org/springframework/boot/bind/RelaxedNames.java

@ -43,7 +43,7 @@ public final class RelaxedNames implements Iterable<String> {
* using dashed notation (e.g. {@literal my-property-name} * using dashed notation (e.g. {@literal my-property-name}
*/ */
public RelaxedNames(String name) { public RelaxedNames(String name) {
this.name = name == null ? "" : name; this.name = (name == null ? "" : name);
initialize(RelaxedNames.this.name, this.values); initialize(RelaxedNames.this.name, this.values);
} }

2
spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactory.java

@ -97,7 +97,7 @@ public class JettyEmbeddedServletContainerFactory extends
public EmbeddedServletContainer getEmbeddedServletContainer( public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) { ServletContextInitializer... initializers) {
WebAppContext context = new WebAppContext(); WebAppContext context = new WebAppContext();
int port = getPort() >= 0 ? getPort() : 0; int port = (getPort() >= 0 ? getPort() : 0);
Server server = new Server(new InetSocketAddress(getAddress(), port)); Server server = new Server(new InetSocketAddress(getAddress(), port));
if (this.resourceLoader != null) { if (this.resourceLoader != null) {

2
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 // Needs to be protected so it can be used by subclasses
protected void customizeConnector(Connector connector) { protected void customizeConnector(Connector connector) {
int port = getPort() >= 0 ? getPort() : 0; int port = (getPort() >= 0 ? getPort() : 0);
connector.setPort(port); connector.setPort(port);
if (connector.getProtocolHandler() instanceof AbstractProtocol) { if (connector.getProtocolHandler() instanceof AbstractProtocol) {
if (getAddress() != null) { if (getAddress() != null) {

Loading…
Cancel
Save