From 2c204f21546f97c3f45df0e361f0d6e728590faf Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 2 Dec 2017 01:05:55 +0900 Subject: [PATCH] Polish Closes gh-11242 --- .../boot/autoconfigure/web/ServerProperties.java | 6 +++--- .../cli/compiler/GenericBomAstTransformation.java | 4 ++-- .../devtools/autoconfigure/DevToolsProperties.java | 2 +- .../asciidoc/appendix-application-properties.adoc | 4 ++-- .../spring-boot-docs/src/main/asciidoc/howto.adoc | 2 +- .../boot/test/context/SpringBootContextLoader.java | 2 +- .../boot/loader/util/SystemPropertyUtils.java | 2 +- .../jetty/JettyServletWebServerFactory.java | 2 +- .../tomcat/TomcatReactiveWebServerFactory.java | 14 +++++++------- .../tomcat/TomcatServletWebServerFactory.java | 14 +++++++------- .../undertow/UndertowServletWebServerFactory.java | 4 ++-- .../org/springframework/boot/web/server/Http2.java | 2 +- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index a96fdc922e8..1118965e8cb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -74,7 +74,7 @@ public class ServerProperties { private String displayName = "application"; @NestedConfigurationProperty - private ErrorProperties error = new ErrorProperties(); + private final ErrorProperties error = new ErrorProperties(); /** * Whether X-Forwarded-* headers should be applied to the HttpRequest. @@ -104,10 +104,10 @@ public class ServerProperties { private Ssl ssl; @NestedConfigurationProperty - private Compression compression = new Compression(); + private final Compression compression = new Compression(); @NestedConfigurationProperty - private Http2 http2 = new Http2(); + private final Http2 http2 = new Http2(); private Servlet servlet = new Servlet(); diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GenericBomAstTransformation.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GenericBomAstTransformation.java index 11ed2f71e17..48b87c08925 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GenericBomAstTransformation.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GenericBomAstTransformation.java @@ -43,8 +43,8 @@ import org.springframework.core.Ordered; * dependencies in the BOM (and its transitives) will be added to the dependency * management lookup, so an app can use just the artifact id (e.g. "spring-jdbc") in a * {@code @Grab}. To install, implement the missing methods and list the class in - * {@code META-INF/services/org.springframework.boot.cli.compiler.SpringBootAstTransformation} - * . The {@link #getOrder()} value needs to be before + * {@code META-INF/services/org.springframework.boot.cli.compiler.SpringBootAstTransformation}. + * The {@link #getOrder()} value needs to be before * {@link DependencyManagementBomTransformation#ORDER}. * * @author Dave Syer diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java index 5ecf9bc1226..f752f9c354a 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.java @@ -40,7 +40,7 @@ public class DevToolsProperties { private Livereload livereload = new Livereload(); @NestedConfigurationProperty - private RemoteDevToolsProperties remote = new RemoteDevToolsProperties(); + private final RemoteDevToolsProperties remote = new RemoteDevToolsProperties(); public Restart getRestart() { return this.restart; diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index b944260060a..16f4e467f0e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -46,9 +46,9 @@ content into your application. Rather, pick only the properties that you need. logging.level.*= # Log levels severity mapping. For instance, `logging.level.org.springframework=DEBUG` logging.path= # Location of the log file. For instance, `/var/log` logging.pattern.console= # Appender pattern for output to the console. Supported only with the default Logback setup. + logging.pattern.dateformat= # Appender pattern for log dateformat (default yyyy-MM-dd HH:mm:ss.SSS). Only supported with the default logback setup. logging.pattern.file= # Appender pattern for output to a file. Supported only with the default Logback setup. logging.pattern.level= # Appender pattern for log level (default: %5p). Supported only with the default Logback setup. - logging.pattern.dateformat= # Appender pattern for log dateformat (default yyyy-MM-dd HH:mm:ss.SSS). Only supported with the default logback setup. logging.register-shutdown-hook=false # Register a shutdown hook for the logging system when it is initialized. # AOP @@ -170,7 +170,7 @@ content into your application. Rather, pick only the properties that you need. server.error.include-stacktrace=never # When to include a "stacktrace" attribute. server.error.path=/error # Path of the error controller. server.error.whitelabel.enabled=true # Enable the default error page displayed in browsers in case of a server error. - server.http2.enabled=true # Whether to enable HTTP/2 support, if the current environment supports it. + server.http2.enabled=false # Whether to enable HTTP/2 support, if the current environment supports it. server.jetty.acceptors= # Number of acceptor threads to use. server.jetty.accesslog.append=false # Append to log. server.jetty.accesslog.date-format=dd/MMM/yyyy:HH:mm:ss Z # Timestamp format of the request log. diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index 26039db1d73..6407284bc75 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -729,7 +729,7 @@ out-of-the-box by JDK8. [NOTE] ==== Spring Boot does not support `h2c`, the cleartext version of the HTTP/2 protocol. So you -must configure <>. +must <>. ==== Currently, only Undertow and Tomcat are supported with this configuration key. diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java index 69b1ec9d274..566252fdaf8 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java @@ -238,7 +238,7 @@ public class SpringBootContextLoader extends AbstractContextLoader { /** * Detect the default configuration classes for the supplied test class. By default * simply delegates to - * {@link AnnotationConfigContextLoaderUtils#detectDefaultConfigurationClasses} . + * {@link AnnotationConfigContextLoaderUtils#detectDefaultConfigurationClasses}. * @param declaringClass the test class that declared {@code @ContextConfiguration} * @return an array of default configuration classes, potentially empty but never * {@code null} diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/util/SystemPropertyUtils.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/util/SystemPropertyUtils.java index 42cc44ade2f..9fc42ede0c5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/util/SystemPropertyUtils.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/util/SystemPropertyUtils.java @@ -24,7 +24,7 @@ import java.util.Set; * Helper class for resolving placeholders in texts. Usually applied to file paths. *

* A text may contain {@code $ ...} placeholders, to be resolved as system properties: - * e.g. {@code $ user.dir} . Default values can be supplied using the ":" separator + * e.g. {@code $ user.dir}. Default values can be supplied using the ":" separator * between key and value. *

* Adapted from Spring. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java index 54043d38c26..9ac427f3e13 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java @@ -416,7 +416,7 @@ public class JettyServletWebServerFactory extends AbstractServletWebServerFactor } /** - * Factory method called to create the {@link JettyWebServer} . Subclasses can + * Factory method called to create the {@link JettyWebServer}. Subclasses can * override this method to return a different {@link JettyWebServer} or apply * additional processing to the Jetty server. * @param server the Jetty server. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java index 7ede659ead3..9d7fac6e68b 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java @@ -163,7 +163,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac /** * Set {@link TomcatContextCustomizer}s that should be applied to the Tomcat - * {@link Context} . Calling this method will replace any existing customizers. + * {@link Context}. Calling this method will replace any existing customizers. * @param tomcatContextCustomizers the customizers to set */ public void setTomcatContextCustomizers( @@ -175,7 +175,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac /** * Returns a mutable collection of the {@link TomcatContextCustomizer}s that will be - * applied to the Tomcat {@link Context} . + * applied to the Tomcat {@link Context}. * @return the listeners that will be applied */ public Collection getTomcatContextCustomizers() { @@ -196,7 +196,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac /** * Set {@link TomcatConnectorCustomizer}s that should be applied to the Tomcat - * {@link Connector} . Calling this method will replace any existing customizers. + * {@link Connector}. Calling this method will replace any existing customizers. * @param tomcatConnectorCustomizers the customizers to set */ public void setTomcatConnectorCustomizers( @@ -220,7 +220,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac /** * Returns a mutable collection of the {@link TomcatConnectorCustomizer}s that will be - * applied to the Tomcat {@link Connector} . + * applied to the Tomcat {@link Connector}. * @return the customizers that will be applied */ public Collection getTomcatConnectorCustomizers() { @@ -228,8 +228,8 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac } /** - * Set {@link LifecycleListener}s that should be applied to the Tomcat {@link Context} - * . Calling this method will replace any existing listeners. + * Set {@link LifecycleListener}s that should be applied to the Tomcat {@link Context}. + * Calling this method will replace any existing listeners. * @param contextLifecycleListeners the listeners to set */ public void setContextLifecycleListeners( @@ -241,7 +241,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac /** * Returns a mutable collection of the {@link LifecycleListener}s that will be applied - * to the Tomcat {@link Context} . + * to the Tomcat {@link Context}. * @return the context lifecycle listeners that will be applied */ public Collection getContextLifecycleListeners() { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java index 20b07d8eccc..3a6f759cc40 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java @@ -522,8 +522,8 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto } /** - * Set {@link LifecycleListener}s that should be applied to the Tomcat {@link Context} - * . Calling this method will replace any existing listeners. + * Set {@link LifecycleListener}s that should be applied to the Tomcat {@link Context}. + * Calling this method will replace any existing listeners. * @param contextLifecycleListeners the listeners to set */ public void setContextLifecycleListeners( @@ -535,7 +535,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto /** * Returns a mutable collection of the {@link LifecycleListener}s that will be applied - * to the Tomcat {@link Context} . + * to the Tomcat {@link Context}. * @return the context lifecycle listeners that will be applied */ public Collection getContextLifecycleListeners() { @@ -555,7 +555,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto /** * Set {@link TomcatContextCustomizer}s that should be applied to the Tomcat - * {@link Context} . Calling this method will replace any existing customizers. + * {@link Context}. Calling this method will replace any existing customizers. * @param tomcatContextCustomizers the customizers to set */ public void setTomcatContextCustomizers( @@ -567,7 +567,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto /** * Returns a mutable collection of the {@link TomcatContextCustomizer}s that will be - * applied to the Tomcat {@link Context} . + * applied to the Tomcat {@link Context}. * @return the listeners that will be applied */ public Collection getTomcatContextCustomizers() { @@ -588,7 +588,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto /** * Set {@link TomcatConnectorCustomizer}s that should be applied to the Tomcat - * {@link Connector} . Calling this method will replace any existing customizers. + * {@link Connector}. Calling this method will replace any existing customizers. * @param tomcatConnectorCustomizers the customizers to set */ public void setTomcatConnectorCustomizers( @@ -612,7 +612,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto /** * Returns a mutable collection of the {@link TomcatConnectorCustomizer}s that will be - * applied to the Tomcat {@link Connector} . + * applied to the Tomcat {@link Connector}. * @return the customizers that will be applied */ public Collection getTomcatConnectorCustomizers() { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java index 21a8786a2c5..86b6862adfc 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java @@ -160,7 +160,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac /** * Returns a mutable collection of the {@link UndertowBuilderCustomizer}s that will be - * applied to the Undertow {@link Builder} . + * applied to the Undertow {@link Builder}. * @return the customizers that will be applied */ public Collection getBuilderCustomizers() { @@ -191,7 +191,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac /** * Returns a mutable collection of the {@link UndertowDeploymentInfoCustomizer}s that - * will be applied to the Undertow {@link DeploymentInfo} . + * will be applied to the Undertow {@link DeploymentInfo}. * @return the customizers that will be applied */ public Collection getDeploymentInfoCustomizers() { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java index b4687974c79..ec0acb9ab2a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Http2.java @@ -25,7 +25,7 @@ package org.springframework.boot.web.server; public class Http2 { /** - * If HTTP/2 protocol is enabled. + * Whether to enable HTTP/2 support, if the current environment supports it. */ private boolean enabled = false;