diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java index 92a3a377c1..e3072923d9 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java @@ -29,7 +29,7 @@ import org.springframework.util.Assert; *

* If a different order is required or a new {@link Status} type will be used, the order * can be set by calling {@link #setStatusOrder(List)}. - * + * * @author Christian Dupuis * @since 1.1.0 */ diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfigurationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfigurationTests.java index a17d0a7d2f..a6a0c6a659 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfigurationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfigurationTests.java @@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue; /** * Tests for {@link EndpointAutoConfiguration}. - * + * * @author Dave Syer * @author Phillip Webb * @author Greg Turnquist diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java index 19c62295e6..a97a26d54d 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java @@ -21,11 +21,11 @@ import java.util.Map; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.springframework.boot.actuate.health.DataSourceHealthIndicator; import org.springframework.boot.actuate.health.HealthIndicator; import org.springframework.boot.actuate.health.MongoHealthIndicator; import org.springframework.boot.actuate.health.RabbitHealthIndicator; import org.springframework.boot.actuate.health.RedisHealthIndicator; -import org.springframework.boot.actuate.health.DataSourceHealthIndicator; import org.springframework.boot.actuate.health.SolrHealthIndicator; import org.springframework.boot.actuate.health.VanillaHealthIndicator; import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration; @@ -41,7 +41,7 @@ import static org.junit.Assert.assertEquals; /** * Tests for {@link HealthIndicatorAutoConfiguration}. - * + * * @author Christian Dupuis */ public class HealthIndicatorAutoConfigurationTests { @@ -149,8 +149,8 @@ public class HealthIndicatorAutoConfigurationTests { Map beans = this.context .getBeansOfType(HealthIndicator.class); assertEquals(1, beans.size()); - assertEquals(DataSourceHealthIndicator.class, beans.values().iterator() - .next().getClass()); + assertEquals(DataSourceHealthIndicator.class, beans.values().iterator().next() + .getClass()); } @Test diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SolrHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SolrHealthIndicatorTests.java index e29b7ab5a1..ad8b2432f1 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SolrHealthIndicatorTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SolrHealthIndicatorTests.java @@ -37,7 +37,7 @@ import static org.mockito.Mockito.when; /** * Tests for {@link SolrHealthIndicator} - * + * * @author Andy Wilkinson */ public class SolrHealthIndicatorTests { diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java index af167bee49..de202084db 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java @@ -22,7 +22,7 @@ import static org.junit.Assert.assertEquals; /** * Tests for {@link VanillaHealthIndicator}. - * + * * @author Phillip Webb */ public class VanillaHealthIndicatorTests { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfiguration.java index 96211b45d9..ee462e151c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfiguration.java @@ -37,7 +37,7 @@ import org.springframework.data.solr.repository.SolrRepository; * If active auto configuration does the same as * {@link org.springframework.data.solr.repository.config.EnableSolrRepositories} would * do. - * + * * @author Christoph Strobl * @since 1.1.0 */ diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java index 5d9dc80406..1ce398f7ba 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java @@ -44,7 +44,7 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; /** * {@link EnableAutoConfiguration Auto-configuration} for FreeMarker. - * + * * @author Andy Wilkinson * @author Dave Syer * @since 1.1.0 diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java index 627aa41f4d..adccbee711 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java @@ -47,7 +47,7 @@ import org.springframework.web.servlet.view.velocity.VelocityViewResolver; /** * {@link EnableAutoConfiguration Auto-configuration} for Velocity. - * + * * @author Andy Wilkinson * @since 1.1.0 */ diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java index c4fedf176d..b5d0b9aaff 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java @@ -22,7 +22,6 @@ import org.junit.Test; import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; import org.springframework.boot.autoconfigure.data.alt.elasticsearch.CityElasticsearchDbRepository; -import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.elasticsearch.city.City; import org.springframework.boot.autoconfigure.data.elasticsearch.city.CityRepository; import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaRepositoriesAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaRepositoriesAutoConfigurationTests.java index 83b7a2104e..b809ac4fca 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaRepositoriesAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaRepositoriesAutoConfigurationTests.java @@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfigurati import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; import org.springframework.boot.autoconfigure.data.alt.mongo.CityMongoDbRepository; import org.springframework.boot.autoconfigure.data.alt.solr.CitySolrRepository; -import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.jpa.city.City; import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java index e06e2cc526..82bf2c32ef 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaWebAutoConfigurationTests.java @@ -20,7 +20,6 @@ import org.junit.After; import org.junit.Test; import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration.JpaWebConfiguration; import org.springframework.boot.autoconfigure.data.jpa.city.City; import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/city/CityRepository.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/city/CityRepository.java index d222a5b73d..1a41c420aa 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/city/CityRepository.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jpa/city/CityRepository.java @@ -22,6 +22,7 @@ import org.springframework.data.jpa.repository.JpaRepository; public interface CityRepository extends JpaRepository { + @Override Page findAll(Pageable pageable); Page findByNameLikeAndCountryLikeAllIgnoringCase(String name, String country, diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java index f514e8d60d..07fbdff000 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/SolrRepositoriesAutoConfigurationTests.java @@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfigurati import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; import org.springframework.boot.autoconfigure.data.alt.solr.CitySolrRepository; import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage; -import org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.solr.city.City; import org.springframework.boot.autoconfigure.data.solr.city.CityRepository; import org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/city/City.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/city/City.java index 48b74c36ef..43972c1138 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/city/City.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/solr/city/City.java @@ -26,8 +26,11 @@ import org.springframework.data.solr.core.mapping.SolrDocument; @SolrDocument(solrCoreName = "collection1") public class City { - private @Id String id; - private @Indexed String name; + @Id + private String id; + + @Indexed + private String name; public String getId() { return this.id; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java index c3101bbc54..520e919609 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java @@ -16,11 +16,6 @@ package org.springframework.boot.autoconfigure.jdbc; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.net.URL; import java.net.URLClassLoader; import java.sql.Connection; @@ -50,6 +45,11 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; import com.zaxxer.hikari.HikariDataSource; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + /** * Tests for {@link DataSourceAutoConfiguration}. * @@ -70,7 +70,7 @@ public class DataSourceAutoConfigurationTests { @After public void restore() { EmbeddedDatabaseConnection.override = null; - if (context!=null) { + if (context != null) { context.close(); } } @@ -264,6 +264,7 @@ public class DataSourceAutoConfigurationTests { return false; } + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { return Mockito.mock(Logger.class); } diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JmsAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JmsAutoConfigurationTests.java index c708fe3a2c..0afe2bc5df 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JmsAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JmsAutoConfigurationTests.java @@ -207,8 +207,7 @@ public class JmsAutoConfigurationTests { Class... additionalClasses) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); context.register(additionalClasses); - context.register(ActiveMQAutoConfiguration.class, - JmsAutoConfiguration.class); + context.register(ActiveMQAutoConfiguration.class, JmsAutoConfiguration.class); return context; } diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java index be1805ae55..60cbaf711d 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java @@ -17,7 +17,6 @@ package org.springframework.boot.autoconfigure.jms.activemq; import org.junit.Test; -import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQProperties; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.core.env.StandardEnvironment; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java index 2578cb5fe4..cf223c4ece 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java @@ -19,8 +19,6 @@ package org.springframework.boot.autoconfigure.jms.hornetq; import org.hornetq.core.config.Configuration; import org.hornetq.core.server.JournalType; import org.junit.Test; -import org.springframework.boot.autoconfigure.jms.hornetq.HornetQEmbeddedConfigurationFactory; -import org.springframework.boot.autoconfigure.jms.hornetq.HornetQProperties; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.equalTo; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java index 328ce7e087..6ee1d9714f 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java @@ -33,7 +33,7 @@ import static org.junit.Assert.assertThat; /** * Tests for {@link HibernateJpaAutoConfiguration}. - * + * * @author Dave Syer * @author Phillip Webb * @author Andy Wilkinson diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java index 76e2e94f9a..f133e4e994 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java @@ -106,7 +106,7 @@ public class RunCommand extends OptionParsingCommand { this.runner = new SpringApplicationRunner(configuration, sourceOptions.getSourcesArray(), sourceOptions.getArgsArray()); this.runner.compileAndRun(); - + return ExitStatus.OK; } diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java index 4a4e68f721..633a5d76b1 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java @@ -70,7 +70,8 @@ public abstract class AstUtils { String... annotations) { for (AnnotationNode annotationNode : node.getAnnotations()) { for (String annotation : annotations) { - if (PatternMatchUtils.simpleMatch(annotation, annotationNode.getClassNode().getName())) { + if (PatternMatchUtils.simpleMatch(annotation, annotationNode + .getClassNode().getName())) { return true; } } diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java index 3c1d4579f1..7485aa20b5 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java @@ -33,7 +33,7 @@ import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext; *

* This class provides a fluent API for conditionally adding dependencies. For example: * {@code dependencies.ifMissing("com.corp.SomeClass").add(module)}. - * + * * @author Phillip Webb * @author Andy Wilkinson */ diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java index 542f62ecec..a9ae4bbc9c 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java @@ -265,7 +265,8 @@ public class GroovyCompiler { public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { - ImportCustomizer importCustomizer = new SmartImportCustomizer(source, context, classNode); + ImportCustomizer importCustomizer = new SmartImportCustomizer(source, + context, classNode); ClassNode mainClassNode = getMainClass(source.getAST().getClasses()); // Additional auto configuration diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/JUnitCompilerAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/JUnitCompilerAutoConfiguration.java index 30f1b80374..1eac8b2c65 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/JUnitCompilerAutoConfiguration.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/JUnitCompilerAutoConfiguration.java @@ -42,10 +42,8 @@ public class JUnitCompilerAutoConfiguration extends CompilerAutoConfiguration { } @Override - public void applyImports(ImportCustomizer imports) - throws CompilationFailedException { - imports.addStarImports("org.junit") - .addStaticStars("org.junit.Assert") + public void applyImports(ImportCustomizer imports) throws CompilationFailedException { + imports.addStarImports("org.junit").addStaticStars("org.junit.Assert") .addStaticStars("org.hamcrest.MatcherAssert") .addStaticStars("org.hamcrest.Matchers"); } diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java index 287da499dd..a27c5c32d2 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java @@ -46,7 +46,7 @@ public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration public void applyImports(ImportCustomizer imports) { imports.addImports("reactor.core.Reactor", "reactor.core.spec.Reactors", "reactor.core.Observable", "reactor.event.Event", - "reactor.function.Functions", "reactor.function.Predicates", + "reactor.function.Functions", "reactor.function.Predicates", "reactor.function.Suppliers", "reactor.spring.context.annotation.Consumer", "reactor.spring.context.annotation.Selector", diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringBootCompilerAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringBootCompilerAutoConfiguration.java index 47c3014f63..dd53bec801 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringBootCompilerAutoConfiguration.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringBootCompilerAutoConfiguration.java @@ -45,8 +45,10 @@ public class SpringBootCompilerAutoConfiguration extends CompilerAutoConfigurati @Override public void applyImports(ImportCustomizer imports) { - imports.addImports("javax.annotation.PostConstruct", - "javax.annotation.PreDestroy", "groovy.util.logging.Log", + imports.addImports( + "javax.annotation.PostConstruct", + "javax.annotation.PreDestroy", + "groovy.util.logging.Log", "org.springframework.stereotype.Controller", "org.springframework.stereotype.Service", "org.springframework.stereotype.Component", diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java index 8558294dcd..01aa15fa87 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringMvcCompilerAutoConfiguration.java @@ -50,8 +50,7 @@ public class SpringMvcCompilerAutoConfiguration extends CompilerAutoConfiguratio public void applyImports(ImportCustomizer imports) { imports.addStarImports("org.springframework.web.bind.annotation", "org.springframework.web.servlet.config.annotation", - "org.springframework.web.servlet", - "org.springframework.http", + "org.springframework.web.servlet", "org.springframework.http", "org.springframework.web.servlet.handler", "org.springframework.http", "org.springframework.ui", "groovy.text"); imports.addStaticImport(GroovyTemplate.class.getName(), "template"); diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/dependencies/ArtifactCoordinatesResolver.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/dependencies/ArtifactCoordinatesResolver.java index dcf5755fe3..46070aacf6 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/dependencies/ArtifactCoordinatesResolver.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/dependencies/ArtifactCoordinatesResolver.java @@ -23,7 +23,7 @@ package org.springframework.boot.cli.compiler.dependencies; * the relevant piece from the identifier. Alternatively the identifier may be in the form * {@code artifactId}, in which case coordinate resolution uses implementation-specific * metadata to resolve the groupId and version. - * + * * @author Andy Wilkinson */ public interface ArtifactCoordinatesResolver { diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java index ed13cd15ce..b017bb793b 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java @@ -48,7 +48,7 @@ import org.eclipse.aether.util.filter.DependencyFilterUtils; * A {@link GrapeEngine} implementation that uses Aether, the dependency resolution system used by * Maven. - * + * * @author Andy Wilkinson * @author Phillip Webb */ diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/ManagedDependenciesFactory.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/ManagedDependenciesFactory.java index 54f540b98a..2a6cc9379f 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/ManagedDependenciesFactory.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/ManagedDependenciesFactory.java @@ -27,8 +27,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies; import org.springframework.boot.dependency.tools.PomDependencies; /** - * Factory to create Maven {@link Dependency} objects from Boot - * {@link PomDependencies}. + * Factory to create Maven {@link Dependency} objects from Boot {@link PomDependencies}. * * @author Phillip Webb */ diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java b/spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java index 3cc91f82d9..cded2fe34d 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java @@ -55,8 +55,8 @@ public abstract class GroovyTemplate { return result.toString(); } - private static Template getTemplate(TemplateEngine engine, String name) throws CompilationFailedException, - ClassNotFoundException, IOException { + private static Template getTemplate(TemplateEngine engine, String name) + throws CompilationFailedException, ClassNotFoundException, IOException { File file = new File("templates", name); if (file.exists()) { diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java index 8500c9d2ac..4c9a096d03 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/DependencyCustomizerTests.java @@ -39,7 +39,7 @@ import static org.mockito.Mockito.when; /** * Tests for {@link DependencyCustomizer} - * + * * @author Andy Wilkinson */ public class DependencyCustomizerTests { diff --git a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/CustomVersionManagementTests.java b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/CustomVersionManagementTests.java index 26f8c01bba..a252dc1998 100644 --- a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/CustomVersionManagementTests.java +++ b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/CustomVersionManagementTests.java @@ -25,7 +25,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies; /** * Tests for using the Gradle plugin's support for custom version management - * + * * @author Andy Wilkinson */ public class CustomVersionManagementTests { diff --git a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java index 16ed982b0b..89eff86ec5 100644 --- a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java +++ b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java @@ -22,21 +22,21 @@ import org.springframework.boot.dependency.tools.ManagedDependencies; /** * Tests for using the Gradle plugin's support for installing artifacts - * + * * @author Dave Syer */ public class InstallTests { private ProjectConnection project; - private static final String BOOT_VERSION = ManagedDependencies.get().find( - "spring-boot").getVersion(); + private static final String BOOT_VERSION = ManagedDependencies.get() + .find("spring-boot").getVersion(); @Test public void cleanInstall() throws Exception { project = new ProjectCreator().createProject("installer"); - project.newBuild().forTasks("install").withArguments( - "-PbootVersion=" + BOOT_VERSION, "--stacktrace").run(); + project.newBuild().forTasks("install") + .withArguments("-PbootVersion=" + BOOT_VERSION, "--stacktrace").run(); } @Test @@ -44,8 +44,9 @@ public class InstallTests { project = new ProjectCreator().createProject("install-app"); // "install" from the application plugin was renamed "installApp" in Gradle // 1.0 - project.newBuild().forTasks("installApp").withArguments( - "-PbootVersion=" + BOOT_VERSION, "--stacktrace", "--info").run(); + project.newBuild().forTasks("installApp") + .withArguments("-PbootVersion=" + BOOT_VERSION, "--stacktrace", "--info") + .run(); } } diff --git a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/MainClassTests.java b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/MainClassTests.java index 260601bea7..00ffdb1602 100644 --- a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/MainClassTests.java +++ b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/MainClassTests.java @@ -25,7 +25,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies; /** * Tests for using the Gradle plugin's support for installing artifacts - * + * * @author Dave Syer */ public class MainClassTests { @@ -42,7 +42,8 @@ public class MainClassTests { @Test public void buildFromRunTask() { - project.newBuild().forTasks("build").withArguments("-PbootVersion=" + BOOT_VERSION, "--info").run(); + project.newBuild().forTasks("build") + .withArguments("-PbootVersion=" + BOOT_VERSION, "--info").run(); } } diff --git a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/NoJarTests.java b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/NoJarTests.java index 53b27086b4..66468ae96f 100644 --- a/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/NoJarTests.java +++ b/spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/NoJarTests.java @@ -16,14 +16,14 @@ package org.springframework.boot.gradle; -import static org.junit.Assert.assertFalse; - import java.io.File; import org.gradle.tooling.ProjectConnection; import org.junit.Test; import org.springframework.boot.dependency.tools.ManagedDependencies; +import static org.junit.Assert.assertFalse; + /** * Tests for using the Gradle plugin's support for flat directory repos * diff --git a/spring-boot-integration-tests/src/test/java/org/springframework/boot/starter/StarterDependenciesIntegrationTests.java b/spring-boot-integration-tests/src/test/java/org/springframework/boot/starter/StarterDependenciesIntegrationTests.java index b2548b5d0b..4e0470e755 100644 --- a/spring-boot-integration-tests/src/test/java/org/springframework/boot/starter/StarterDependenciesIntegrationTests.java +++ b/spring-boot-integration-tests/src/test/java/org/springframework/boot/starter/StarterDependenciesIntegrationTests.java @@ -38,7 +38,7 @@ import static org.junit.Assert.fail; /** * Tests for the various starter projects to check that they don't pull in unwanted * transitive dependencies when used with Gradle - * + * * @author Andy Wilkinson */ @RunWith(Parameterized.class) diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java index ed144260d3..1d27e5480d 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java @@ -16,10 +16,6 @@ package sample.actuator; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.util.Map; import org.junit.Test; @@ -34,6 +30,10 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + /** * Integration tests for endpoints configuration. * @@ -42,7 +42,7 @@ import org.springframework.test.context.web.WebAppConfiguration; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @WebAppConfiguration -@IntegrationTest({"server.port=0", "management.context_path=/admin"}) +@IntegrationTest({ "server.port=0", "management.context_path=/admin" }) @DirtiesContext public class ManagementPathSampleActuatorApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java index cd6a19b7e5..439dd5f2c8 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java @@ -16,10 +16,6 @@ package sample.actuator; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.util.Map; import org.junit.Test; @@ -34,6 +30,10 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + /** * Integration tests for endpoints configuration. * @@ -42,7 +42,7 @@ import org.springframework.test.context.web.WebAppConfiguration; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @WebAppConfiguration -@IntegrationTest({"server.port=0", "server.servletPath=/spring"}) +@IntegrationTest({ "server.port=0", "server.servletPath=/spring" }) @DirtiesContext public class ServletPathSampleActuatorApplicationTests { @@ -53,7 +53,8 @@ public class ServletPathSampleActuatorApplicationTests { public void testErrorPath() throws Exception { @SuppressWarnings("rawtypes") ResponseEntity entity = new TestRestTemplate("user", "password") - .getForEntity("http://localhost:" + this.port + "/spring/error", Map.class); + .getForEntity("http://localhost:" + this.port + "/spring/error", + Map.class); assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, entity.getStatusCode()); @SuppressWarnings("unchecked") Map body = entity.getBody(); diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathUnsecureSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathUnsecureSampleActuatorApplicationTests.java index 5189ce67ab..8cd3a13ece 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathUnsecureSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathUnsecureSampleActuatorApplicationTests.java @@ -16,9 +16,6 @@ package sample.actuator; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; - import java.util.Map; import org.junit.Test; @@ -33,6 +30,9 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + /** * Integration tests for unsecured service endpoints (even with Spring Security on * classpath). @@ -42,7 +42,8 @@ import org.springframework.test.context.web.WebAppConfiguration; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @WebAppConfiguration -@IntegrationTest({ "server.port:0", "security.basic.enabled:false", "server.servletPath:/spring" }) +@IntegrationTest({ "server.port:0", "security.basic.enabled:false", + "server.servletPath:/spring" }) @DirtiesContext public class ServletPathUnsecureSampleActuatorApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java index eb91dc4929..5624524ada 100644 --- a/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/test/java/sample/data/elasticsearch/SampleElasticsearchApplicationTests.java @@ -16,8 +16,6 @@ package sample.data.elasticsearch; -import static org.junit.Assert.*; - import java.net.ConnectException; import org.junit.Rule; @@ -25,9 +23,11 @@ import org.junit.Test; import org.springframework.boot.test.OutputCapture; import org.springframework.core.NestedCheckedException; +import static org.junit.Assert.assertTrue; + /** * Tests for {@link SampleElasticsearchApplication}. - * + * * @author Artur Konczak */ public class SampleElasticsearchApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/ui/secure/SampleSecureApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/ui/secure/SampleSecureApplicationTests.java index d9c2c62cb5..0d38d11cd1 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/ui/secure/SampleSecureApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/ui/secure/SampleSecureApplicationTests.java @@ -16,10 +16,6 @@ package sample.ui.secure; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -42,6 +38,10 @@ import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + /** * Basic integration tests for demo application. * @@ -65,8 +65,8 @@ public class SampleSecureApplicationTests { "http://localhost:" + this.port, HttpMethod.GET, new HttpEntity( headers), String.class); assertEquals(HttpStatus.FOUND, entity.getStatusCode()); - assertTrue("Wrong location:\n" + entity.getHeaders(), - entity.getHeaders().getLocation().toString().endsWith(port + "/login")); + assertTrue("Wrong location:\n" + entity.getHeaders(), entity.getHeaders() + .getLocation().toString().endsWith(port + "/login")); } @Test @@ -74,8 +74,8 @@ public class SampleSecureApplicationTests { HttpHeaders headers = new HttpHeaders(); headers.setAccept(Arrays.asList(MediaType.TEXT_HTML)); ResponseEntity entity = new TestRestTemplate().exchange( - "http://localhost:" + this.port + "/login", HttpMethod.GET, new HttpEntity( - headers), String.class); + "http://localhost:" + this.port + "/login", HttpMethod.GET, + new HttpEntity(headers), String.class); assertEquals(HttpStatus.OK, entity.getStatusCode()); assertTrue("Wrong content:\n" + entity.getBody(), entity.getBody().contains("_csrf")); @@ -94,8 +94,8 @@ public class SampleSecureApplicationTests { new HttpEntity>(form, headers), String.class); assertEquals(HttpStatus.FOUND, entity.getStatusCode()); - assertTrue("Wrong location:\n" + entity.getHeaders(), - entity.getHeaders().getLocation().toString().endsWith(port + "/")); + assertTrue("Wrong location:\n" + entity.getHeaders(), entity.getHeaders() + .getLocation().toString().endsWith(port + "/")); assertNotNull("Missing cookie:\n" + entity.getHeaders(), entity.getHeaders().get("Set-Cookie")); } @@ -107,8 +107,8 @@ public class SampleSecureApplicationTests { assertEquals(HttpStatus.OK, page.getStatusCode()); String cookie = page.getHeaders().getFirst("Set-Cookie"); headers.set("Cookie", cookie); - Matcher matcher = Pattern.compile("(?s).*name=\"_csrf\".*?value=\"([^\"]+).*").matcher( - page.getBody()); + Matcher matcher = Pattern.compile("(?s).*name=\"_csrf\".*?value=\"([^\"]+).*") + .matcher(page.getBody()); assertTrue("No csrf token: " + page.getBody(), matcher.matches()); headers.set("X-CSRF-TOKEN", matcher.group(1)); return headers; diff --git a/spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/PropertiesFileDependencies.java b/spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/PropertiesFileDependencies.java index bcb4b76bb5..6b9eb7c0aa 100644 --- a/spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/PropertiesFileDependencies.java +++ b/spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/PropertiesFileDependencies.java @@ -23,9 +23,9 @@ import java.util.Properties; import java.util.TreeMap; /** - * {@link Dependencies} backed by an external properties file (of the form created - * by the Spring IO platform). The property key should be the groupId and artifactId (in - * the form {@literal groupId:artifactId}) and the value should be the version. + * {@link Dependencies} backed by an external properties file (of the form created by the + * Spring IO platform). The property key should be the groupId and artifactId (in the form + * {@literal groupId:artifactId}) and the value should be the version. * * @author Phillip Webb * @since 1.1.0 @@ -33,8 +33,8 @@ import java.util.TreeMap; public class PropertiesFileDependencies extends AbstractDependencies { /** - * Create a new {@link PropertiesFileDependencies} instance from the specified - * input stream. + * Create a new {@link PropertiesFileDependencies} instance from the specified input + * stream. * @param inputStream source input stream (will be closed when properties have been * loaded) * @throws IOException diff --git a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java index fb4c7acd38..17d8b36bf5 100644 --- a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java +++ b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java @@ -110,7 +110,8 @@ class JarURLConnection extends java.net.JarURLConnection { this.connected = true; } - private void throwFileNotFound(Object entry, JarFile jarFile) throws FileNotFoundException { + private void throwFileNotFound(Object entry, JarFile jarFile) + throws FileNotFoundException { if (Boolean.TRUE.equals(useFastExceptions.get())) { throw FILE_NOT_FOUND_EXCEPTION; } diff --git a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/ExecutableArchiveLauncherTests.java b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/ExecutableArchiveLauncherTests.java index d987ef0914..85e8d82c68 100644 --- a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/ExecutableArchiveLauncherTests.java +++ b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/ExecutableArchiveLauncherTests.java @@ -33,7 +33,7 @@ import static org.mockito.Mockito.when; /** * Tests for {@link ExecutableArchiveLauncher} - * + * * @author Andy Wilkinson */ public class ExecutableArchiveLauncherTests { @@ -74,16 +74,17 @@ public class ExecutableArchiveLauncherTests { when(this.javaAgentDetector.isJavaAgentJar(javaAgent)).thenReturn(true); - doWithTccl(new URLClassLoader(new URL[] { javaAgent, one }), new Callable() { + doWithTccl(new URLClassLoader(new URL[] { javaAgent, one }), + new Callable() { - @Override - public Void call() throws Exception { - ClassLoader classLoader = ExecutableArchiveLauncherTests.this.launcher - .createClassLoader(new URL[0]); - assertClassLoaderUrls(classLoader, new URL[] { one }); - return null; - } - }); + @Override + public Void call() throws Exception { + ClassLoader classLoader = ExecutableArchiveLauncherTests.this.launcher + .createClassLoader(new URL[0]); + assertClassLoaderUrls(classLoader, new URL[] { one }); + return null; + } + }); } private void assertClassLoaderUrls(ClassLoader classLoader, URL[] urls) { @@ -92,7 +93,7 @@ public class ExecutableArchiveLauncherTests { } private static final class UnitTestExecutableArchiveLauncher extends - ExecutableArchiveLauncher { + ExecutableArchiveLauncher { public UnitTestExecutableArchiveLauncher(JavaAgentDetector javaAgentDetector) { super(javaAgentDetector); diff --git a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/InputArgumentsJavaAgentDetectorTests.java b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/InputArgumentsJavaAgentDetectorTests.java index f6123d4c52..0543211190 100644 --- a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/InputArgumentsJavaAgentDetectorTests.java +++ b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/InputArgumentsJavaAgentDetectorTests.java @@ -28,7 +28,7 @@ import static org.junit.Assert.assertTrue; /** * Tests for {@link InputArgumentsJavaAgentDetector} - * + * * @author Andy Wilkinson */ public class InputArgumentsJavaAgentDetectorTests { @@ -39,7 +39,7 @@ public class InputArgumentsJavaAgentDetectorTests { InputArgumentsJavaAgentDetector detector = new InputArgumentsJavaAgentDetector( Arrays.asList("-javaagent:my-agent.jar")); assertFalse(detector.isJavaAgentJar(new File("something-else.jar") - .getCanonicalFile().toURI().toURL())); + .getCanonicalFile().toURI().toURL())); } @Test diff --git a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java index ebb48e8d4b..23cf43fa86 100644 --- a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java +++ b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java @@ -78,16 +78,15 @@ public class JarFileArchiveTests { @Test public void getUrl() throws Exception { URL url = this.archive.getUrl(); - assertThat(url.toString(), equalTo("jar:" + this.rootJarFileUrl - + "!/")); + assertThat(url.toString(), equalTo("jar:" + this.rootJarFileUrl + "!/")); } @Test public void getNestedArchive() throws Exception { Entry entry = getEntriesMap(this.archive).get("nested.jar"); Archive nested = this.archive.getNestedArchive(entry); - assertThat(nested.getUrl().toString(), - equalTo("jar:" + this.rootJarFileUrl + "!/nested.jar!/")); + assertThat(nested.getUrl().toString(), equalTo("jar:" + this.rootJarFileUrl + + "!/nested.jar!/")); } @Test diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java index 454c540a6f..6b92646461 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java @@ -151,9 +151,9 @@ public class LoggingApplicationListener implements SmartApplicationListener { // Logback won't read backslashes so add a clean path for it to use if (!StringUtils.hasLength(System.getProperty("LOG_TEMP"))) { String path = System.getProperty("java.io.tmpdir"); - path = StringUtils.cleanPath(path); - if(path.endsWith("/")) { - path = path.substring(0,path.length()-1); + path = StringUtils.cleanPath(path); + if (path.endsWith("/")) { + path = path.substring(0, path.length() - 1); } System.setProperty("LOG_TEMP", path); } diff --git a/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java index 5e3e4b8954..38be0ecf5c 100644 --- a/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java @@ -86,10 +86,11 @@ public class LoggingApplicationListenerTests { } private String tmpDir() { - String path = this.context.getEnvironment().resolvePlaceholders("${java.io.tmpdir}"); + String path = this.context.getEnvironment().resolvePlaceholders( + "${java.io.tmpdir}"); path = path.replace("\\", "/"); - if(path.endsWith("/")) { - path = path.substring(0, path.length()-1); + if (path.endsWith("/")) { + path = path.substring(0, path.length() - 1); } return path; }