From 09dac5ff00980e0f02f14a3458ad7853fa5bd54b Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 1 Dec 2014 19:35:03 -0800 Subject: [PATCH] Apply formatting and cleanup rules --- .../autoconfigure/HealthMvcEndpointProperties.java | 4 ++-- .../actuate/autoconfigure/JolokiaProperties.java | 4 ++-- .../actuate/autoconfigure/ShellProperties.java | 11 ++++++----- .../boot/actuate/endpoint/AbstractEndpoint.java | 4 ++-- .../boot/actuate/endpoint/Sanitizer.java | 4 ++-- .../metrics/reader/MetricRegistryMetricReader.java | 8 +++++--- .../MessageSourceAutoConfiguration.java | 10 +++++----- .../amqp/RabbitAutoConfiguration.java | 3 ++- .../elasticsearch/ElasticsearchProperties.java | 3 ++- .../autoconfigure/flyway/FlywayProperties.java | 9 +++++---- .../groovy/template/GroovyTemplateProperties.java | 2 +- .../autoconfigure/jackson/JacksonProperties.java | 8 +++++--- .../jdbc/DataSourceConfigMetadata.java | 14 ++++++++------ .../autoconfigure/jdbc/DataSourceProperties.java | 3 ++- .../jms/activemq/ActiveMQProperties.java | 3 ++- .../jms/hornetq/HornetQProperties.java | 3 ++- .../liquibase/LiquibaseProperties.java | 4 ++-- .../orm/jpa/HibernateJpaAutoConfiguration.java | 3 ++- .../boot/autoconfigure/orm/jpa/JpaProperties.java | 10 +++++----- .../boot/autoconfigure/redis/RedisProperties.java | 14 +++++++------- .../AbstractTemplateViewResolverProperties.java | 12 ++++++++---- .../autoconfigure/web/MultipartProperties.java | 8 ++++---- .../boot/autoconfigure/web/ServerProperties.java | 8 ++++---- .../BasicErrorControllerDirectMockMvcTests.java | 4 ++-- .../web/DefaultErrorViewIntegrationTests.java | 8 ++++---- .../boot/maven/DependencyFilter.java | 7 ++++--- .../boot/bind/PropertiesConfigurationFactory.java | 3 ++- .../boot/bind/PropertySourcesPropertyValues.java | 9 +++++---- 28 files changed, 102 insertions(+), 81 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java index 3716189128..dd1650e5f9 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthMvcEndpointProperties.java @@ -33,8 +33,8 @@ import org.springframework.http.HttpStatus; public class HealthMvcEndpointProperties { /** - * Mapping of health statuses to HttpStatus codes. By default, registered - * health statuses map to sensible defaults (i.e. UP maps to 200). + * Mapping of health statuses to HttpStatus codes. By default, registered health + * statuses map to sensible defaults (i.e. UP maps to 200). */ private Map mapping = new HashMap(); diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java index 61e0e92683..f4e9e8097c 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaProperties.java @@ -31,8 +31,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class JolokiaProperties { /** - * Jolokia settings. These are traditionally set using servlet parameters, refer - * to the documentation of Jolokia for more details. + * Jolokia settings. These are traditionally set using servlet parameters, refer to + * the documentation of Jolokia for more details. */ private Map config = new HashMap(); diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java index 7651a0890e..e8ce934e0f 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java @@ -43,8 +43,8 @@ public class ShellProperties { /** * Authentication type (can be "simple", "spring", "key" or "jaas"). Auto-detected - * according to the environment (i.e. if Spring Security is available, "spring" is used by - * default). + * according to the environment (i.e. if Spring Security is available, "spring" is + * used by default). */ private String auth = "simple"; @@ -75,8 +75,8 @@ public class ShellProperties { private String[] disabledCommands = new String[] { "jpa*", "jdbc*", "jndi*" }; /** - * Comma-separated list of plugins to disable. Certain plugins are disabled - * by default based on the environment. + * Comma-separated list of plugins to disable. Certain plugins are disabled by default + * based on the environment. */ private String[] disabledPlugins = new String[0]; @@ -287,7 +287,8 @@ public class ShellProperties { public static class Telnet extends CrshShellProperties { /** - * Enable CRaSH telnet support. Enabled by default if the TelnetPlugin is available. + * Enable CRaSH telnet support. Enabled by default if the TelnetPlugin is + * available. */ private boolean enabled = ClassUtils.isPresent("org.crsh.telnet.TelnetPlugin", ClassUtils.getDefaultClassLoader()); diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java index 017da99473..e459335014 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java @@ -28,8 +28,8 @@ import javax.validation.constraints.Pattern; public abstract class AbstractEndpoint implements Endpoint { /** - * Endpoint identifier. With HTTP monitoring the identifier - * of the endpoint is mapped to a URL (e.g. 'foo' is mapped to '/foo'). + * Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped + * to a URL (e.g. 'foo' is mapped to '/foo'). */ @NotNull @Pattern(regexp = "\\w+", message = "ID must only contains letters, numbers and '_'") diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java index fd0deed86d..4b8d665413 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Sanitizer.java @@ -38,8 +38,8 @@ class Sanitizer { } /** - * Keys that should be sanitized. Keys can be simple strings that the property - * ends with or regex expressions. + * Keys that should be sanitized. Keys can be simple strings that the property ends + * with or regex expressions. * @param keysToSanitize the keys to sanitize */ public void setKeysToSanitize(String... keysToSanitize) { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/reader/MetricRegistryMetricReader.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/reader/MetricRegistryMetricReader.java index 32270e6e80..53fa758dff 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/reader/MetricRegistryMetricReader.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/reader/MetricRegistryMetricReader.java @@ -46,7 +46,7 @@ import com.codahale.metrics.Timer; * {@link MetricRegistry}. Gauges and Counters are reflected as a single value. Timers, * Meters and Histograms are expanded into sets of metrics containing all the properties * of type Number. - * + * * @author Dave Syer * */ @@ -121,6 +121,7 @@ public class MetricRegistryMetricReader implements MetricReader, MetricRegistryL remove(name); } + @Override public void onCounterAdded(String name, Counter counter) { names.put(name, name); reverse.add(name, name); @@ -209,10 +210,11 @@ public class MetricRegistryMetricReader implements MetricReader, MetricRegistryL String name = iterator.next(); return MetricRegistryMetricReader.this.findOne(name); } - + @Override public void remove() { - throw new UnsupportedOperationException("You cannot remove from this iterator."); + throw new UnsupportedOperationException( + "You cannot remove from this iterator."); } } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java index 81085f2ce3..ded2e09b60 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java @@ -60,9 +60,9 @@ public class MessageSourceAutoConfiguration { private static final Resource[] NO_RESOURCES = {}; /** - * Comma-separated list of basenames, each following the ResourceBundle convention. Essentially - * a fully-qualified classpath location. If it doesn't contain a package qualifier (such as - * "org.mypackage"), it will be resolved from the classpath root. + * Comma-separated list of basenames, each following the ResourceBundle convention. + * Essentially a fully-qualified classpath location. If it doesn't contain a package + * qualifier (such as "org.mypackage"), it will be resolved from the classpath root. */ private String basename = "messages"; @@ -72,8 +72,8 @@ public class MessageSourceAutoConfiguration { private String encoding = "utf-8"; /** - * Loaded resource bundle files cache expiration, in seconds. When set to - * -1, bundles are cached forever. + * Loaded resource bundle files cache expiration, in seconds. When set to -1, bundles + * are cached forever. */ private int cacheSeconds = -1; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfiguration.java index 9f259963ee..b9b30d44ab 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfiguration.java @@ -127,7 +127,8 @@ public class RabbitAutoConfiguration { protected static class MessagingTemplateConfiguration { @Bean - public RabbitMessagingTemplate rabbitMessagingTemplate(RabbitTemplate rabbitTemplate) { + public RabbitMessagingTemplate rabbitMessagingTemplate( + RabbitTemplate rabbitTemplate) { return new RabbitMessagingTemplate(rabbitTemplate); } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java index 7e27b5cce2..f3a8308b8d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java @@ -34,7 +34,8 @@ public class ElasticsearchProperties { private String clusterName = "elasticsearch"; /** - * Comma-separated list of cluster node addresses. If not specified, starts a client node. + * Comma-separated list of cluster node addresses. If not specified, starts a client + * node. */ private String clusterNodes; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java index fd5170a653..fceba7b3c6 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java @@ -56,18 +56,19 @@ public class FlywayProperties { private String user; /** - *Login password of the database to migrate. + * Login password of the database to migrate. */ private String password; /** - * JDBC url of the database to migrate. If not set, the primary configured - * data source is used. + * JDBC url of the database to migrate. If not set, the primary configured data source + * is used. */ private String url; /** - * SQL statements to execute to initialize a connection immediately after obtaining it. + * SQL statements to execute to initialize a connection immediately after obtaining + * it. */ private List initSqls = Collections.emptyList(); diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java index e59d2ee99a..e0dfd5183a 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateProperties.java @@ -41,7 +41,7 @@ public class GroovyTemplateProperties extends AbstractViewResolverProperties { private String prefix = DEFAULT_PREFIX; /** - *Suffix that gets appended to view names when building a URL. + * Suffix that gets appended to view names when building a URL. */ private String suffix = DEFAULT_SUFFIX; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java index a284773a63..07317ea187 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java @@ -38,13 +38,15 @@ import com.fasterxml.jackson.databind.SerializationFeature; public class JacksonProperties { /** - * Date format string (yyyy-MM-dd HH:mm:ss), or a fully-qualified date format class name. + * Date format string (yyyy-MM-dd HH:mm:ss), or a fully-qualified date format class + * name. */ private String dateFormat; /** - * One of the constants on Jackson's PropertyNamingStrategy (CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES). - * Can also be a fully-qualified class name of a PropertyNamingStrategy subclass. + * One of the constants on Jackson's PropertyNamingStrategy + * (CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES). Can also be a fully-qualified class + * name of a PropertyNamingStrategy subclass. */ private String propertyNamingStrategy; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfigMetadata.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfigMetadata.java index d7faf1c493..91e99deb05 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfigMetadata.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfigMetadata.java @@ -16,15 +16,15 @@ package org.springframework.boot.autoconfigure.jdbc; -import com.zaxxer.hikari.HikariDataSource; import org.apache.commons.dbcp.BasicDataSource; import org.apache.tomcat.jdbc.pool.DataSource; - import org.springframework.boot.context.properties.ConfigurationProperties; +import com.zaxxer.hikari.HikariDataSource; + /** - * Expose the metadata of the supported data sources. Only used to harvest - * the relevant properties metadata. + * Expose the metadata of the supported data sources. Only used to harvest the relevant + * properties metadata. * * @author Stephane Nicoll * @since 1.2.0 @@ -38,12 +38,14 @@ class DataSourceConfigMetadata { @ConfigurationProperties(DataSourceProperties.PREFIX) public HikariDataSource hikariDataSource() { - return (HikariDataSource) DataSourceBuilder.create().type(HikariDataSource.class).build(); + return (HikariDataSource) DataSourceBuilder.create().type(HikariDataSource.class) + .build(); } @ConfigurationProperties(DataSourceProperties.PREFIX) public BasicDataSource dbcpDataSource() { - return (BasicDataSource)DataSourceBuilder.create().type(BasicDataSource.class).build(); + return (BasicDataSource) DataSourceBuilder.create().type(BasicDataSource.class) + .build(); } } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java index 1e7b97ba5d..a3b9ba2baa 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java @@ -62,7 +62,8 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB private ClassLoader classLoader; /** - * JNDI location of the datasource. Class, url, username & password are ignored when set. + * JNDI location of the datasource. Class, url, username & password are ignored when + * set. */ private String jndiName; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java index 56f629404a..35b010e307 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java @@ -39,7 +39,8 @@ public class ActiveMQProperties { private boolean inMemory = true; /** - * Specify if a PooledConnectionFactory should be created instead of a regular ConnectionFactory. + * Specify if a PooledConnectionFactory should be created instead of a regular + * ConnectionFactory. */ private boolean pooled; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java index 4110a6e5db..87135974bd 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java @@ -34,7 +34,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class HornetQProperties { /** - * HornetQ deployment mode, auto-detected by default. Can be explicitly set to "native" or "embedded". + * HornetQ deployment mode, auto-detected by default. Can be explicitly set to + * "native" or "embedded". */ private HornetQMode mode; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java index 5fe50d4f49..f97062ab6b 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java @@ -73,8 +73,8 @@ public class LiquibaseProperties { private String password; /** - * JDBC url of the database to migrate. If not set, the primary configured - * data source is used. + * JDBC url of the database to migrate. If not set, the primary configured data source + * is used. */ private String url; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java index 91618436f0..b78e8dfab9 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java @@ -94,7 +94,8 @@ public class HibernateJpaAutoConfiguration extends JpaBaseConfiguration { } } - private void configureJtaPlatform(Map vendorProperties) throws LinkageError { + private void configureJtaPlatform(Map vendorProperties) + throws LinkageError { JtaTransactionManager jtaTransactionManager = getJtaTransactionManager(); if (jtaTransactionManager != null) { vendorProperties.put(JTA_PLATFORM, new SpringJtaPlatform( diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java index fd4419d54d..6f894e502d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java @@ -52,8 +52,8 @@ public class JpaProperties { private String databasePlatform; /** - * Target database to operate on, auto-detected by default. Can be alternatively - * set using the "databasePlatform" property. + * Target database to operate on, auto-detected by default. Can be alternatively set + * using the "databasePlatform" property. */ private Database database = Database.DEFAULT; @@ -137,9 +137,9 @@ public class JpaProperties { private Class namingStrategy; /** - * DDL mode ("none", "validate", "update", "create", "create-drop"). This is actually a shortcut - * for the "hibernate.hbm2ddl.auto" property. Default to "create-drop" when using an embedded database, - * "none" otherwise. + * DDL mode ("none", "validate", "update", "create", "create-drop"). This is + * actually a shortcut for the "hibernate.hbm2ddl.auto" property. Default to + * "create-drop" when using an embedded database, "none" otherwise. */ private String ddlAuto; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java index f699acc151..94c2f28288 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/redis/RedisProperties.java @@ -111,21 +111,21 @@ public class RedisProperties { private int maxIdle = 8; /** - * Target for the minimum number of idle connections to maintain in - * the pool. This setting only has an effect if it is positive. + * Target for the minimum number of idle connections to maintain in the pool. This + * setting only has an effect if it is positive. */ private int minIdle = 0; /** - * Max number of connections that can be allocated by the pool at a given time. Use - * a negative value for no limit. + * Max number of connections that can be allocated by the pool at a given time. + * Use a negative value for no limit. */ private int maxActive = 8; /** - * Maximum amount of time (in milliseconds) a connection allocation should block before - * throwing an exception when the pool is exhausted. Use a negative value to block - * indefinitely. + * Maximum amount of time (in milliseconds) a connection allocation should block + * before throwing an exception when the pool is exhausted. Use a negative value + * to block indefinitely. */ private int maxWait = -1; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java index 5e907d31bd..646c016486 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java @@ -47,22 +47,26 @@ public abstract class AbstractTemplateViewResolverProperties extends private String requestContextAttribute; /** - * Set whether all request attributes should be added to the model prior to merging with the template. + * Set whether all request attributes should be added to the model prior to merging + * with the template. */ private boolean exposeRequestAttributes = false; /** - * Set whether all HttpSession attributes should be added to the model prior to merging with the template. + * Set whether all HttpSession attributes should be added to the model prior to + * merging with the template. */ private boolean exposeSessionAttributes = false; /** - * Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. + * Set whether HttpServletRequest attributes are allowed to override (hide) controller + * generated model attributes of the same name. */ private boolean allowRequestOverride = false; /** - * Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext". + * Set whether to expose a RequestContext for use by Spring's macro library, under the + * name "springMacroRequestContext". */ private boolean exposeSpringMacroHelpers = true; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java index 54257a3b4e..c1e15fc9ac 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java @@ -56,8 +56,8 @@ public class MultipartProperties { private String location; /** - * Max file size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte - * or Kilobyte size. + * Max file size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or + * Kilobyte size. */ private String maxFileSize = "1Mb"; @@ -68,8 +68,8 @@ public class MultipartProperties { private String maxRequestSize = "10Mb"; /** - * Threshold after which files will be written to disk. Values can use the suffixed "MB" - * or "KB" to indicate a Megabyte or Kilobyte size. + * Threshold after which files will be written to disk. Values can use the suffixed + * "MB" or "KB" to indicate a Megabyte or Kilobyte size. */ private String fileSizeThreshold = "0"; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index eda4e14797..78ec69e2d2 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -260,8 +260,8 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer { + "127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"; // 127/8 /** - * Header that holds the incoming protocol, usually named "X-Forwarded-Proto". Configured - * as a RemoteIpValve only if remoteIpHeader is also set. + * Header that holds the incoming protocol, usually named "X-Forwarded-Proto". + * Configured as a RemoteIpValve only if remoteIpHeader is also set. */ private String protocolHeader; @@ -282,7 +282,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer { private File basedir; /** - * Delay in seconds between the invocation of backgroundProcess methods. + * Delay in seconds between the invocation of backgroundProcess methods. */ private int backgroundProcessorDelay = 30; // seconds @@ -292,7 +292,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer { private int maxThreads = 0; // Number of threads in protocol handler /** - * Maximum size in bytes of the HTTP message header. + * Maximum size in bytes of the HTTP message header. */ private int maxHttpHeaderSize = 0; // bytes diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java index 7bb3248889..f0a0d33aba 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java @@ -28,7 +28,6 @@ import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; - import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; @@ -99,7 +98,8 @@ public class BasicErrorControllerDirectMockMvcTests { @Test public void errorPageNotAvailableWithWhitelabelDisabled() throws Exception { setup((ConfigurableWebApplicationContext) new SpringApplication( - WebMvcIncludedConfiguration.class).run("--server.port=0", "--error.whitelabel.enabled=false")); + WebMvcIncludedConfiguration.class).run("--server.port=0", + "--error.whitelabel.enabled=false")); thrown.expect(ServletException.class); this.mockMvc.perform(get("/error").accept(MediaType.TEXT_HTML)); diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java index 2a654c7e91..94af87dc49 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java @@ -16,10 +16,6 @@ package org.springframework.boot.autoconfigure.web; -import static org.junit.Assert.assertTrue; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -45,6 +41,10 @@ import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import static org.junit.Assert.assertTrue; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + /** * @author Dave Syer */ diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/DependencyFilter.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/DependencyFilter.java index cb67fc1ee4..e9ca8a1f99 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/DependencyFilter.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/DependencyFilter.java @@ -36,7 +36,8 @@ public abstract class DependencyFilter extends AbstractArtifactsFilter { private final List filters; /** - * Create a new instance with the list of {@link FilterableDependency} instance(s) to use. + * Create a new instance with the list of {@link FilterableDependency} instance(s) to + * use. */ public DependencyFilter(List dependencies) { this.filters = dependencies; @@ -58,8 +59,8 @@ public abstract class DependencyFilter extends AbstractArtifactsFilter { /** * Check if the specified {@link org.apache.maven.artifact.Artifact} matches the - * specified {@link org.springframework.boot.maven.FilterableDependency}. Returns {@code true} - * if it should be excluded + * specified {@link org.springframework.boot.maven.FilterableDependency}. Returns + * {@code true} if it should be excluded */ protected final boolean equals(Artifact artifact, FilterableDependency dependency) { if (!dependency.getGroupId().equals(artifact.getGroupId())) { 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 841d8ed7b5..7e324aa2d3 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 @@ -262,7 +262,8 @@ public class PropertiesConfigurationFactory implements FactoryBean, } } } - PropertyNamePatternsMatcher patterns = new DefaultPropertyNamePatternsMatcher(names); + PropertyNamePatternsMatcher patterns = new DefaultPropertyNamePatternsMatcher( + names); PropertyValues propertyValues = (this.properties != null ? new MutablePropertyValues( this.properties) : new PropertySourcesPropertyValues( diff --git a/spring-boot/src/main/java/org/springframework/boot/bind/PropertySourcesPropertyValues.java b/spring-boot/src/main/java/org/springframework/boot/bind/PropertySourcesPropertyValues.java index 6da78b970e..9042f08cd5 100644 --- a/spring-boot/src/main/java/org/springframework/boot/bind/PropertySourcesPropertyValues.java +++ b/spring-boot/src/main/java/org/springframework/boot/bind/PropertySourcesPropertyValues.java @@ -48,9 +48,9 @@ public class PropertySourcesPropertyValues implements PropertyValues { private final PropertySources propertySources; - private static final Collection PATTERN_MATCHED_PROPERTY_SOURCES = Arrays.asList( - StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, - StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME); + private static final Collection PATTERN_MATCHED_PROPERTY_SOURCES = Arrays + .asList(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, + StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME); /** * Create a new PropertyValues from the given PropertySources @@ -70,7 +70,8 @@ public class PropertySourcesPropertyValues implements PropertyValues { */ public PropertySourcesPropertyValues(PropertySources propertySources, Collection includePatterns, Collection names) { - this(propertySources, new SimplePropertyNamePatternsMatcher(includePatterns), names); + this(propertySources, new SimplePropertyNamePatternsMatcher(includePatterns), + names); } /**