Skip to content

Commit

Permalink
Apply formatting and cleanup rules
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Dec 2, 2014
1 parent 48db545 commit 09dac5f
Show file tree
Hide file tree
Showing 28 changed files with 102 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
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<String, HttpStatus> mapping = new HashMap<String, HttpStatus>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
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<String, String> config = new HashMap<String, String>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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];

Expand Down Expand Up @@ -287,7 +287,8 @@ public String getPort() {
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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
public abstract class AbstractEndpoint<T> implements Endpoint<T> {

/**
* 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 '_'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* {@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
*
*/
Expand Down Expand Up @@ -121,6 +121,7 @@ public void onGaugeRemoved(String name) {
remove(name);
}

@Override
public void onCounterAdded(String name, Counter counter) {
names.put(name, name);
reverse.add(name, name);
Expand Down Expand Up @@ -209,10 +210,11 @@ public Metric<?> next() {
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.");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public ConnectionFactory rabbitConnectionFactory(RabbitProperties config) {
protected static class MessagingTemplateConfiguration {

@Bean
public RabbitMessagingTemplate rabbitMessagingTemplate(RabbitTemplate rabbitTemplate) {
public RabbitMessagingTemplate rabbitMessagingTemplate(
RabbitTemplate rabbitTemplate) {
return new RabbitMessagingTemplate(rabbitTemplate);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> initSqls = Collections.emptyList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,12 +38,14 @@ public DataSource tomcatDataSource() {

@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();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ protected void customizeVendorProperties(Map<String, Object> vendorProperties) {
}
}

private void configureJtaPlatform(Map<String, Object> vendorProperties) throws LinkageError {
private void configureJtaPlatform(Map<String, Object> vendorProperties)
throws LinkageError {
JtaTransactionManager jtaTransactionManager = getJtaTransactionManager();
if (jtaTransactionManager != null) {
vendorProperties.put(JTA_PLATFORM, new SpringJtaPlatform(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -137,9 +137,9 @@ public static class Hibernate {
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@ public static class Pool {
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";

Expand Down
Loading

0 comments on commit 09dac5f

Please sign in to comment.