diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AccessLevel.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AccessLevel.java index b609dda148..107aba0024 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AccessLevel.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/AccessLevel.java @@ -38,6 +38,9 @@ public enum AccessLevel { */ FULL; + /** + * The request attribute used to store the {@link AccessLevel}. + */ public static final String REQUEST_ATTRIBUTE = "cloudFoundryAccessLevel"; private final List ids; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryAuthorizationException.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryAuthorizationException.java index 93f33f1b06..46b53a15fe 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryAuthorizationException.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryAuthorizationException.java @@ -58,24 +58,54 @@ public class CloudFoundryAuthorizationException extends RuntimeException { */ public enum Reason { + /** + * Access Denied. + */ ACCESS_DENIED(HttpStatus.FORBIDDEN), + /** + * Invalid Audience. + */ INVALID_AUDIENCE(HttpStatus.UNAUTHORIZED), + /** + * Invalid Issuer. + */ INVALID_ISSUER(HttpStatus.UNAUTHORIZED), + /** + * Invalid Key ID. + */ INVALID_KEY_ID(HttpStatus.UNAUTHORIZED), + /** + * Invalid Signature. + */ INVALID_SIGNATURE(HttpStatus.UNAUTHORIZED), + /** + * Invalid Token. + */ INVALID_TOKEN(HttpStatus.UNAUTHORIZED), + /** + * Missing Authorization. + */ MISSING_AUTHORIZATION(HttpStatus.UNAUTHORIZED), + /** + * Token Expired. + */ TOKEN_EXPIRED(HttpStatus.UNAUTHORIZED), + /** + * Unsupported Token Signing Algorithm. + */ UNSUPPORTED_TOKEN_SIGNING_ALGORITHM(HttpStatus.UNAUTHORIZED), + /** + * Service Unavailable. + */ SERVICE_UNAVAILABLE(HttpStatus.SERVICE_UNAVAILABLE); private final HttpStatus status; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureOrder.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureOrder.java index ac9266cd90..2d90a2199b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureOrder.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureOrder.java @@ -48,6 +48,9 @@ import org.springframework.core.annotation.Order; @Documented public @interface AutoConfigureOrder { + /** + * The default order value. + */ int DEFAULT_ORDER = 0; /** diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java index e25c3ab13e..37c246a7a0 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java @@ -83,6 +83,10 @@ import org.springframework.core.io.support.SpringFactoriesLoader; @Import(AutoConfigurationImportSelector.class) public @interface EnableAutoConfiguration { + /** + * Environment property that can be used to override when auto-configuration is + * enabled. + */ String ENABLED_OVERRIDE_PROPERTY = "spring.boot.enableautoconfiguration"; /** diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java index 2fca3a250b..697524a48a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java @@ -401,23 +401,28 @@ public final class ConditionMessage { */ public enum Style { + /** + * Render with normal styling. + */ NORMAL { + @Override protected Object applyToItem(Object item) { return item; } - @Override - public Collection applyTo(Collection items) { - return items; - } }, + /** + * Render with the item surrounded by quotes. + */ QUOTE { + @Override protected String applyToItem(Object item) { return (item != null) ? "'" + item + "'" : null; } + }; public Collection applyTo(Collection items) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration.java index 6a4c61c956..05bfae6a5b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration.java @@ -69,13 +69,13 @@ import org.springframework.web.servlet.DispatcherServlet; @AutoConfigureAfter(ServletWebServerFactoryAutoConfiguration.class) public class DispatcherServletAutoConfiguration { - /* - * The bean name for a DispatcherServlet that will be mapped to the root URL "/" + /** + * The bean name for a DispatcherServlet that will be mapped to the root URL "/". */ public static final String DEFAULT_DISPATCHER_SERVLET_BEAN_NAME = "dispatcherServlet"; - /* - * The bean name for a ServletRegistrationBean for the DispatcherServlet "/" + /** + * The bean name for a ServletRegistrationBean for the DispatcherServlet "/". */ public static final String DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME = "dispatcherServletRegistration"; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java index 6a02485a3e..ecd2d7a6eb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java @@ -145,8 +145,14 @@ import org.springframework.web.util.UrlPathHelper; ValidationAutoConfiguration.class }) public class WebMvcAutoConfiguration { + /** + * The default Spring MVC view prefix. + */ public static final String DEFAULT_PREFIX = ""; + /** + * The default Spring MVC view suffix. + */ public static final String DEFAULT_SUFFIX = ""; private static final String[] SERVLET_LOCATIONS = { "/" }; diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index d4ec959680..694a83ca8f 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -15,8 +15,8 @@ - - + +