diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/HttpClientMetricsAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/HttpClientMetricsAutoConfiguration.java index 4742306534c..a5f04c8a022 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/HttpClientMetricsAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/HttpClientMetricsAutoConfiguration.java @@ -54,8 +54,8 @@ public class HttpClientMetricsAutoConfiguration { @Order(0) public MeterFilter metricsHttpClientUriTagFilter(MetricsProperties properties) { String metricName = properties.getWeb().getClient().getRequest().getMetricName(); - MeterFilter denyFilter = new OnlyOnceLoggingDenyMeterFilter(() -> String.format( - "Reached the maximum number of URI tags for '%s'. Are you using " + "'uriVariables'?", metricName)); + MeterFilter denyFilter = new OnlyOnceLoggingDenyMeterFilter(() -> String + .format("Reached the maximum number of URI tags for '%s'. Are you using 'uriVariables'?", metricName)); return MeterFilter.maximumAllowableTags(metricName, "uri", properties.getWeb().getClient().getMaxUriTags(), denyFilter); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactory.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactory.java index 142de44aba9..431ec29b635 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactory.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementContextFactory.java @@ -70,7 +70,7 @@ class ReactiveManagementContextFactory implements ManagementContextFactory { Class factoryClass = parent.getBean(ReactiveWebServerFactory.class).getClass(); if (cannotBeInstantiated(factoryClass)) { throw new FatalBeanException("ReactiveWebServerFactory implementation " + factoryClass.getName() - + " cannot be instantiated. " + "To allow a separate management port to be used, a top-level class " + + " cannot be instantiated. To allow a separate management port to be used, a top-level class " + "or static inner class should be used instead"); } return factoryClass; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementContextFactory.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementContextFactory.java index aa66ec2c4e2..65ace83969c 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementContextFactory.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementContextFactory.java @@ -73,7 +73,7 @@ class ServletManagementContextFactory implements ManagementContextFactory { Class factoryClass = parent.getBean(ServletWebServerFactory.class).getClass(); if (cannotBeInstantiated(factoryClass)) { throw new FatalBeanException("ServletWebServerFactory implementation " + factoryClass.getName() - + " cannot be instantiated. " + "To allow a separate management port to be used, a top-level class " + + " cannot be instantiated. To allow a separate management port to be used, a top-level class " + "or static inner class should be used instead"); } return factoryClass; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/TokenTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/TokenTests.java index 3599bdea345..45e9e2f3621 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/TokenTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/TokenTests.java @@ -113,7 +113,7 @@ class TokenTests { @Test void getExpiryWhenExpIsNullShouldThrowException() { String header = "{\"alg\": \"RS256\", \"kid\": \"key-id\", \"typ\": \"JWT\"}"; - String claims = "{\"iss\": \"http://localhost:8080/uaa/oauth/token\"" + "}"; + String claims = "{\"iss\": \"http://localhost:8080/uaa/oauth/token\"}"; Token token = createToken(header, claims); assertThatExceptionOfType(CloudFoundryAuthorizationException.class).isThrownBy(token::getExpiry) .satisfies(reasonRequirement(Reason.INVALID_TOKEN)); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java index 1530fc33126..5b267f0430f 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java @@ -75,13 +75,14 @@ class AuditEventsEndpointDocumentationTests extends MockMvcEndpointDocumentation .perform(get("/actuator/auditevents") .param("principal", "alice").param("after", queryTimestamp).param("type", "logout")) .andExpect(status().isOk()) - .andDo(document("auditevents/filtered", requestParameters( - parameterWithName("after").description( - "Restricts the events to those that occurred " + "after the given time. Optional."), - parameterWithName("principal") - .description("Restricts the events to those with the given " + "principal. Optional."), - parameterWithName("type") - .description("Restricts the events to those with the given " + "type. Optional.")))); + .andDo(document("auditevents/filtered", + requestParameters( + parameterWithName("after").description( + "Restricts the events to those that occurred after the given time. Optional."), + parameterWithName("principal").description( + "Restricts the events to those with the given principal. Optional."), + parameterWithName("type") + .description("Restricts the events to those with the given type. Optional.")))); verify(this.repository).find("alice", now.toInstant(), "logout"); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/CachesEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/CachesEndpointDocumentationTests.java index a75ce56bc50..9b9e0a408c8 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/CachesEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/CachesEndpointDocumentationTests.java @@ -57,7 +57,7 @@ class CachesEndpointDocumentationTests extends MockMvcEndpointDocumentationTests private static final List requestParameters = Collections .singletonList(parameterWithName("cacheManager").description( - "Name of the cacheManager to qualify the cache. May be " + "omitted if the cache name is unique.") + "Name of the cacheManager to qualify the cache. May be omitted if the cache name is unique.") .optional()); @Test @@ -66,7 +66,7 @@ class CachesEndpointDocumentationTests extends MockMvcEndpointDocumentationTests .andDo(MockMvcRestDocumentation.document("caches/all", responseFields(fieldWithPath("cacheManagers").description("Cache managers keyed by id."), fieldWithPath("cacheManagers.*.caches") - .description("Caches in the application context keyed by " + "name.")) + .description("Caches in the application context keyed by name.")) .andWithPrefix("cacheManagers.*.caches.*.", fieldWithPath("target") .description("Fully qualified name of the native cache.")))); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java index eeb303f30a0..40c2e1194d3 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java @@ -66,15 +66,14 @@ class ConditionsReportEndpointDocumentationTests extends MockMvcEndpointDocument @Test void conditions() throws Exception { List positiveMatchFields = Arrays.asList( - fieldWithPath("").description("Classes and methods with conditions that were " + "matched."), + fieldWithPath("").description("Classes and methods with conditions that were matched."), fieldWithPath(".*.[].condition").description("Name of the condition."), fieldWithPath(".*.[].message").description("Details of why the condition was matched.")); List negativeMatchFields = Arrays.asList( - fieldWithPath("").description("Classes and methods with conditions that " + "were not matched."), + fieldWithPath("").description("Classes and methods with conditions that were not matched."), fieldWithPath(".*.notMatched").description("Conditions that were matched."), fieldWithPath(".*.notMatched.[].condition").description("Name of the condition."), - fieldWithPath(".*.notMatched.[].message") - .description("Details of why the condition was" + " not matched."), + fieldWithPath(".*.notMatched.[].message").description("Details of why the condition was not matched."), fieldWithPath(".*.matched").description("Conditions that were matched."), fieldWithPath(".*.matched.[].condition").description("Name of the condition.") .type(JsonFieldType.STRING).optional(), diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java index c1cc42046dc..784c2a3a71d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java @@ -55,7 +55,7 @@ class FlywayEndpointDocumentationTests extends MockMvcEndpointDocumentationTests .andDo(MockMvcRestDocumentation.document("flyway", responseFields(fieldWithPath("contexts").description("Application contexts keyed by id"), fieldWithPath("contexts.*.flywayBeans.*.migrations").description( - "Migrations performed by the Flyway instance, keyed by" + " Flyway bean name.")) + "Migrations performed by the Flyway instance, keyed by Flyway bean name.")) .andWithPrefix("contexts.*.flywayBeans.*.migrations.[].", migrationFieldDescriptors()) .and(parentIdField()))); @@ -69,9 +69,9 @@ class FlywayEndpointDocumentationTests extends MockMvcEndpointDocumentationTests fieldWithPath("installedBy").description("User that installed the applied migration, if any.") .optional(), fieldWithPath("installedOn") - .description("Timestamp of when the applied migration was installed, " + "if any.").optional(), + .description("Timestamp of when the applied migration was installed, if any.").optional(), fieldWithPath("installedRank") - .description("Rank of the applied migration, if any. Later migrations have " + "higher ranks.") + .description("Rank of the applied migration, if any. Later migrations have higher ranks.") .optional(), fieldWithPath("script").description("Name of the script used to execute the migration, if any.") .optional(), @@ -79,8 +79,8 @@ class FlywayEndpointDocumentationTests extends MockMvcEndpointDocumentationTests .description("State of the migration. (" + describeEnumValues(MigrationState.class) + ")"), fieldWithPath("type") .description("Type of the migration. (" + describeEnumValues(MigrationType.class) + ")"), - fieldWithPath("version") - .description("Version of the database after applying the migration, " + "if any.").optional()); + fieldWithPath("version").description("Version of the database after applying the migration, if any.") + .optional()); } @Configuration(proxyBeanMethods = false) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java index d8a108731ec..5c3f7763b5d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java @@ -59,8 +59,7 @@ class HealthEndpointDocumentationTests extends MockMvcEndpointDocumentationTests private static final List componentFields = Arrays.asList( fieldWithPath("status").description("Status of a specific part of the application"), - subsectionWithPath("details") - .description("Details of the health of a specific part of the" + " application.")); + subsectionWithPath("details").description("Details of the health of a specific part of the application.")); @Test void health() throws Exception { @@ -71,7 +70,7 @@ class HealthEndpointDocumentationTests extends MockMvcEndpointDocumentationTests + "`management.endpoint.health.show-details`)."), fieldWithPath("details.*.status").description("Status of a specific part of the application."), subsectionWithPath("details.*.details") - .description("Details of the health of a specific part of the" + " application.")))); + .description("Details of the health of a specific part of the application.")))); } @Test diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java index 8f4d2de25dd..e72a660e508 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java @@ -48,7 +48,7 @@ class LiquibaseEndpointDocumentationTests extends MockMvcEndpointDocumentationTe @Test void liquibase() throws Exception { FieldDescriptor changeSetsField = fieldWithPath("contexts.*.liquibaseBeans.*.changeSets") - .description("Change sets made by the Liquibase beans, keyed by " + "bean name."); + .description("Change sets made by the Liquibase beans, keyed by bean name."); this.mockMvc.perform(get("/actuator/liquibase")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("liquibase", responseFields(fieldWithPath("contexts").description("Application contexts keyed by id"), diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java index f4eab0e6ef4..8b2e18b0c8f 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java @@ -85,7 +85,7 @@ class LoggersEndpointDocumentationTests extends MockMvcEndpointDocumentationTest .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNoContent()) .andDo(MockMvcRestDocumentation.document("loggers/set", requestFields(fieldWithPath("configuredLevel") - .description("Level for the logger. May be" + " omitted to clear the level.").optional()))); + .description("Level for the logger. May be omitted to clear the level.").optional()))); verify(this.loggingSystem).setLogLevel("com.example", LogLevel.DEBUG); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java index a851647ddc1..9be633f7dba 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointReactiveDocumentationTests.java @@ -100,23 +100,23 @@ class MappingsEndpointReactiveDocumentationTests extends AbstractEndpointDocumen requestMappingConditionField(".produces.[].negated").description("Whether the media type is negated.")); List handlerMethod = Arrays.asList( fieldWithPath("*.[].details.handlerMethod").optional().type(JsonFieldType.OBJECT) - .description("Details of the method, if any, " + "that will handle requests to this mapping."), + .description("Details of the method, if any, that will handle requests to this mapping."), fieldWithPath("*.[].details.handlerMethod.className").type(JsonFieldType.STRING) .description("Fully qualified name of the class of the method."), fieldWithPath("*.[].details.handlerMethod.name").type(JsonFieldType.STRING) .description("Name of the method."), fieldWithPath("*.[].details.handlerMethod.descriptor").type(JsonFieldType.STRING) - .description("Descriptor of the method as specified in the Java " + "Language Specification.")); + .description("Descriptor of the method as specified in the Java Language Specification.")); List handlerFunction = Arrays.asList( - fieldWithPath("*.[].details.handlerFunction").optional().type(JsonFieldType.OBJECT).description( - "Details of the function, if any, that will handle " + "requests to this mapping."), + fieldWithPath("*.[].details.handlerFunction").optional().type(JsonFieldType.OBJECT) + .description("Details of the function, if any, that will handle requests to this mapping."), fieldWithPath("*.[].details.handlerFunction.className").type(JsonFieldType.STRING) .description("Fully qualified name of the class of the function.")); List dispatcherHandlerFields = new ArrayList<>(Arrays.asList( - fieldWithPath("*").description( - "Dispatcher handler mappings, if any, keyed by " + "dispatcher handler bean name."), + fieldWithPath("*") + .description("Dispatcher handler mappings, if any, keyed by dispatcher handler bean name."), fieldWithPath("*.[].details").optional().type(JsonFieldType.OBJECT) - .description("Additional implementation-specific " + "details about the mapping. Optional."), + .description("Additional implementation-specific details about the mapping. Optional."), fieldWithPath("*.[].handler").description("Handler for the mapping."), fieldWithPath("*.[].predicate").description("Predicate for the mapping."))); dispatcherHandlerFields.addAll(requestMappingConditions); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java index db0cd420fc3..b4c5c6b4e2d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java @@ -89,10 +89,10 @@ class MappingsEndpointServletDocumentationTests extends AbstractEndpointDocument .description("Dispatcher handler mappings, if any.").optional().type(JsonFieldType.OBJECT), parentIdField()); List dispatcherServletFields = new ArrayList<>(Arrays.asList( - fieldWithPath("*").description( - "Dispatcher servlet mappings, if any, keyed by " + "dispatcher servlet bean name."), + fieldWithPath("*") + .description("Dispatcher servlet mappings, if any, keyed by dispatcher servlet bean name."), fieldWithPath("*.[].details").optional().type(JsonFieldType.OBJECT) - .description("Additional implementation-specific " + "details about the mapping. Optional."), + .description("Additional implementation-specific details about the mapping. Optional."), fieldWithPath("*.[].handler").description("Handler for the mapping."), fieldWithPath("*.[].predicate").description("Predicate for the mapping."))); List requestMappingConditions = Arrays.asList( @@ -117,12 +117,12 @@ class MappingsEndpointServletDocumentationTests extends AbstractEndpointDocument requestMappingConditionField(".produces.[].negated").description("Whether the media type is negated.")); List handlerMethod = Arrays.asList( fieldWithPath("*.[].details.handlerMethod").optional().type(JsonFieldType.OBJECT) - .description("Details of the method, if any, " + "that will handle requests to this mapping."), + .description("Details of the method, if any, that will handle requests to this mapping."), fieldWithPath("*.[].details.handlerMethod.className") .description("Fully qualified name of the class of the method."), fieldWithPath("*.[].details.handlerMethod.name").description("Name of the method."), fieldWithPath("*.[].details.handlerMethod.descriptor") - .description("Descriptor of the method as specified in the Java " + "Language Specification.")); + .description("Descriptor of the method as specified in the Java Language Specification.")); dispatcherServletFields.addAll(handlerMethod); dispatcherServletFields.addAll(requestMappingConditions); this.client.get().uri("/actuator/mappings").exchange().expectBody() diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java index f0479681247..03d946837ae 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java @@ -52,27 +52,27 @@ class ScheduledTasksEndpointDocumentationTests extends MockMvcEndpointDocumentat @Test void scheduledTasks() throws Exception { - this.mockMvc.perform(get("/actuator/scheduledtasks")).andExpect(status().isOk()).andDo(document( - "scheduled-tasks", - preprocessResponse(replacePattern( - Pattern.compile("org.*\\.ScheduledTasksEndpointDocumentationTests\\$" + "TestConfiguration"), - "com.example.Processor")), - responseFields(fieldWithPath("cron").description("Cron tasks, if any."), - targetFieldWithPrefix("cron.[]."), - fieldWithPath("cron.[].expression").description("Cron expression."), - fieldWithPath("fixedDelay").description("Fixed delay tasks, if any."), - targetFieldWithPrefix("fixedDelay.[]."), initialDelayWithPrefix("fixedDelay.[]."), - fieldWithPath("fixedDelay.[].interval") - .description("Interval, in milliseconds, between the end of the last" - + " execution and the start of the next."), - fieldWithPath("fixedRate").description("Fixed rate tasks, if any."), - targetFieldWithPrefix("fixedRate.[]."), - fieldWithPath("fixedRate.[].interval") - .description("Interval, in milliseconds, between the start of each execution."), - initialDelayWithPrefix("fixedRate.[]."), - fieldWithPath("custom").description("Tasks with custom triggers, if any."), - targetFieldWithPrefix("custom.[]."), - fieldWithPath("custom.[].trigger").description("Trigger for the task.")))) + this.mockMvc.perform(get("/actuator/scheduledtasks")).andExpect(status().isOk()) + .andDo(document("scheduled-tasks", + preprocessResponse(replacePattern( + Pattern.compile("org.*\\.ScheduledTasksEndpointDocumentationTests\\$TestConfiguration"), + "com.example.Processor")), + responseFields(fieldWithPath("cron").description("Cron tasks, if any."), + targetFieldWithPrefix("cron.[]."), + fieldWithPath("cron.[].expression").description("Cron expression."), + fieldWithPath("fixedDelay").description("Fixed delay tasks, if any."), + targetFieldWithPrefix("fixedDelay.[]."), initialDelayWithPrefix("fixedDelay.[]."), + fieldWithPath("fixedDelay.[].interval") + .description("Interval, in milliseconds, between the end of the last" + + " execution and the start of the next."), + fieldWithPath("fixedRate").description("Fixed rate tasks, if any."), + targetFieldWithPrefix("fixedRate.[]."), + fieldWithPath("fixedRate.[].interval") + .description("Interval, in milliseconds, between the start of each execution."), + initialDelayWithPrefix("fixedRate.[]."), + fieldWithPath("custom").description("Tasks with custom triggers, if any."), + targetFieldWithPrefix("custom.[]."), + fieldWithPath("custom.[].trigger").description("Trigger for the task.")))) .andDo(MockMvcResultHandlers.print()); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java index ccdddd912bc..97205d9b7b5 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java @@ -70,8 +70,8 @@ class SessionsEndpointDocumentationTests extends MockMvcEndpointDocumentationTes fieldWithPath("attributeNames").description("Names of the attributes stored in the session."), fieldWithPath("creationTime").description("Timestamp of when the session was created."), fieldWithPath("lastAccessedTime").description("Timestamp of when the session was last accessed."), - fieldWithPath("maxInactiveInterval").description( - "Maximum permitted period of inactivity, in seconds, " + "before the session will expire."), + fieldWithPath("maxInactiveInterval") + .description("Maximum permitted period of inactivity, in seconds, before the session will expire."), fieldWithPath("expired").description("Whether the session has expired.")); @MockBean diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java index a52d4dce96d..a95b7d1dc65 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java @@ -69,14 +69,14 @@ class ThreadDumpEndpointDocumentationTests extends MockMvcEndpointDocumentationT .document("threaddump/json", preprocessResponse(limit("threads")), responseFields(fieldWithPath("threads").description("JVM's threads."), fieldWithPath("threads.[].blockedCount").description( - "Total number of times that the thread has been " + "blocked."), + "Total number of times that the thread has been blocked."), fieldWithPath("threads.[].blockedTime").description( "Time in milliseconds that the thread has spent " + "blocked. -1 if thread contention " + "monitoring is disabled."), fieldWithPath("threads.[].daemon") .description("Whether the thread is a daemon " - + "thread. Only available on Java 9 or " + "later.") + + "thread. Only available on Java 9 or later.") .optional().type(JsonFieldType.BOOLEAN), fieldWithPath("threads.[].inNative") .description("Whether the thread is executing native code."), @@ -85,12 +85,10 @@ class ThreadDumpEndpointDocumentationTests extends MockMvcEndpointDocumentationT + "thread is blocked, if any.") .optional().type(JsonFieldType.STRING), fieldWithPath("threads.[].lockInfo") - .description( - "Object for which the thread is blocked " + "waiting.") + .description("Object for which the thread is blocked waiting.") .optional().type(JsonFieldType.OBJECT), fieldWithPath("threads.[].lockInfo.className") - .description( - "Fully qualified class name of the lock" + " object.") + .description("Fully qualified class name of the lock object.") .optional().type(JsonFieldType.STRING), fieldWithPath("threads.[].lockInfo.identityHashCode") .description("Identity hash code of the lock object.") @@ -101,22 +99,21 @@ class ThreadDumpEndpointDocumentationTests extends MockMvcEndpointDocumentationT .description("Class name of the lock object.").optional() .type(JsonFieldType.STRING), fieldWithPath("threads.[].lockedMonitors.[].identityHashCode") - .description("Identity hash code of the lock " + "object.") + .description("Identity hash code of the lock object.") .optional().type(JsonFieldType.NUMBER), fieldWithPath("threads.[].lockedMonitors.[].lockedStackDepth") - .description("Stack depth where the monitor " + "was locked.") + .description("Stack depth where the monitor was locked.") .optional().type(JsonFieldType.NUMBER), subsectionWithPath("threads.[].lockedMonitors.[].lockedStackFrame") - .description("Stack frame that locked the " + "monitor.") - .optional().type(JsonFieldType.OBJECT), + .description("Stack frame that locked the monitor.").optional() + .type(JsonFieldType.OBJECT), fieldWithPath("threads.[].lockedSynchronizers") .description("Synchronizers locked by this thread."), fieldWithPath("threads.[].lockedSynchronizers.[].className") - .description("Class name of the locked " + "synchronizer.") + .description("Class name of the locked synchronizer.") .optional().type(JsonFieldType.STRING), fieldWithPath("threads.[].lockedSynchronizers.[].identityHashCode") - .description( - "Identity hash code of the locked " + "synchronizer.") + .description("Identity hash code of the locked synchronizer.") .optional().type(JsonFieldType.NUMBER), fieldWithPath("threads.[].lockOwnerId") .description("ID of the thread that owns the object on which " @@ -124,7 +121,7 @@ class ThreadDumpEndpointDocumentationTests extends MockMvcEndpointDocumentationT + "thread is not blocked."), fieldWithPath("threads.[].lockOwnerName") .description("Name of the thread that owns the " - + "object on which the thread is " + "blocked, if any.") + + "object on which the thread is blocked, if any.") .optional().type(JsonFieldType.STRING), fieldWithPath("threads.[].priority") .description("Priority of the thread. Only " @@ -136,11 +133,11 @@ class ThreadDumpEndpointDocumentationTests extends MockMvcEndpointDocumentationT .description("Name of the class loader of the " + "class that contains the execution " + "point identified by this entry, if " - + "any. Only available on Java 9 or " + "later.") + + "any. Only available on Java 9 or later.") .optional().type(JsonFieldType.STRING), fieldWithPath("threads.[].stackTrace.[].className") .description("Name of the class that contains the " - + "execution point identified " + "by this entry."), + + "execution point identified by this entry."), fieldWithPath("threads.[].stackTrace.[].fileName") .description("Name of the source file that " + "contains the execution point " @@ -164,8 +161,8 @@ class ThreadDumpEndpointDocumentationTests extends MockMvcEndpointDocumentationT + "identified by this entry, if any. " + "Only available on Java 9 or later.") .optional().type(JsonFieldType.STRING), - fieldWithPath("threads.[].stackTrace.[].nativeMethod").description( - "Whether the execution point is a native " + "method."), + fieldWithPath("threads.[].stackTrace.[].nativeMethod") + .description("Whether the execution point is a native method."), fieldWithPath("threads.[].suspended") .description("Whether the thread is suspended."), fieldWithPath("threads.[].threadId").description("ID of the thread."), diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java index 12b38554b14..50fc7d5fd39 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java @@ -177,7 +177,7 @@ class WebMvcEndpointExposureIntegrationTests { return false; } throw new IllegalStateException( - String.format("Unexpected %s HTTP status for " + "endpoint %s", result.getStatus(), path)); + String.format("Unexpected %s HTTP status for endpoint %s", result.getStatus(), path)); } @RestControllerEndpoint(id = "custommvc") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java index 1d035426aa5..02e82ed1317 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/liquibase/LiquibaseEndpointAutoConfigurationTests.java @@ -91,7 +91,7 @@ class LiquibaseEndpointAutoConfigurationTests { public void setCloseDataSourceOnceMigrated(boolean closeDataSourceOnceMigrated) { if (this.propertiesSet) { throw new IllegalStateException( - "setCloseDataSourceOnceMigrated " + "invoked after afterPropertiesSet"); + "setCloseDataSourceOnceMigrated invoked after afterPropertiesSet"); } super.setCloseDataSourceOnceMigrated(closeDataSourceOnceMigrated); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/RestTemplateMetricsConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/RestTemplateMetricsConfigurationTests.java index 69add0fde3a..197c3e0681e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/RestTemplateMetricsConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/RestTemplateMetricsConfigurationTests.java @@ -89,8 +89,7 @@ class RestTemplateMetricsConfigurationTests { this.contextRunner.withPropertyValues("management.metrics.web.client.max-uri-tags=5").run((context) -> { MeterRegistry registry = getInitializedMeterRegistry(context); assertThat(registry.get("http.client.requests").meters()).hasSize(3); - assertThat(output) - .doesNotContain("Reached the maximum number of URI tags for 'http.client.requests'.") + assertThat(output).doesNotContain("Reached the maximum number of URI tags for 'http.client.requests'.") .doesNotContain("Are you using 'uriVariables'?"); }); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/WebClientMetricsConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/WebClientMetricsConfigurationTests.java index a02513398ff..7eea946366e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/WebClientMetricsConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/WebClientMetricsConfigurationTests.java @@ -88,8 +88,7 @@ class WebClientMetricsConfigurationTests { this.contextRunner.withPropertyValues("management.metrics.web.client.max-uri-tags=5").run((context) -> { MeterRegistry registry = getInitializedMeterRegistry(context); assertThat(registry.get("http.client.requests").meters()).hasSize(3); - assertThat(output) - .doesNotContain("Reached the maximum number of URI tags for 'http.client.requests'.") + assertThat(output).doesNotContain("Reached the maximum number of URI tags for 'http.client.requests'.") .doesNotContain("Are you using 'uriVariables'?"); }); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfigurationTests.java index 90b45e46826..6da93a2272b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfigurationTests.java @@ -122,7 +122,7 @@ class WebMvcMetricsAutoConfigurationTests { MeterRegistry registry = getInitializedMeterRegistry(context); assertThat(registry.get("http.server.requests").meters()).hasSize(3); assertThat(output) - .doesNotContain("Reached the maximum number of URI tags " + "for 'http.server.requests'"); + .doesNotContain("Reached the maximum number of URI tags for 'http.server.requests'"); }); } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/NonUniqueCacheException.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/NonUniqueCacheException.java index ac819b88070..eb0debbd760 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/NonUniqueCacheException.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/NonUniqueCacheException.java @@ -32,7 +32,7 @@ public class NonUniqueCacheException extends RuntimeException { private final Collection cacheManagerNames; public NonUniqueCacheException(String cacheName, Collection cacheManagerNames) { - super(String.format("Multiple caches named %s found, specify the 'cacheManager' " + "to use: %s", cacheName, + super(String.format("Multiple caches named %s found, specify the 'cacheManager' to use: %s", cacheName, cacheManagerNames)); this.cacheName = cacheName; this.cacheManagerNames = Collections.unmodifiableCollection(cacheManagerNames); diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java index 9b0409fef6c..2820777420a 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java @@ -326,7 +326,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext catch (Exception ex) { if (logger.isDebugEnabled()) { logger.debug("Skipping '" + writer.getFullName() + "' on '" + pojo.getClass().getName() - + "' as an exception " + "was thrown when retrieving its value", ex); + + "' as an exception was thrown when retrieving its value", ex); } return; } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoke/MissingParametersException.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoke/MissingParametersException.java index 5d7e839fc53..e31a0cf39df 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoke/MissingParametersException.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoke/MissingParametersException.java @@ -35,7 +35,7 @@ public final class MissingParametersException extends InvalidEndpointRequestExce private final Set missingParameters; public MissingParametersException(Set missingParameters) { - super("Failed to invoke operation because the following required " + "parameters were missing: " + super("Failed to invoke operation because the following required parameters were missing: " + StringUtils.collectionToCommaDelimitedString(missingParameters), "Missing parameters: " + missingParameters.stream().map(OperationParameter::getName).collect(Collectors.joining(","))); diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java index 68598d842a6..9cb1f550e0a 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java @@ -113,7 +113,7 @@ public class JmxEndpointExporter implements InitializingBean, DisposableBean, Be private void unregister(ObjectName objectName) { try { if (logger.isDebugEnabled()) { - logger.debug("Unregister endpoint with ObjectName '" + objectName + "' " + "from the JMX domain"); + logger.debug("Unregister endpoint with ObjectName '" + objectName + "' from the JMX domain"); } this.mBeanServer.unregisterMBean(objectName); } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/MetricsEndpoint.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/MetricsEndpoint.java index e43eeb16315..1295eef9498 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/MetricsEndpoint.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/MetricsEndpoint.java @@ -272,7 +272,7 @@ public class MetricsEndpoint { @Override public String toString() { - return "MeasurementSample{" + "statistic=" + this.statistic + ", value=" + this.value + '}'; + return "MeasurementSample{statistic=" + this.statistic + ", value=" + this.value + '}'; } } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.java index a1005d86f13..46f44f2b48f 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.java @@ -62,7 +62,7 @@ public class DiskSpaceHealthIndicator extends AbstractHealthIndicator { builder.up(); } else { - logger.warn(String.format("Free disk space below threshold. " + "Available: %d bytes (threshold: %s)", + logger.warn(String.format("Free disk space below threshold. Available: %d bytes (threshold: %s)", diskFreeInBytes, this.threshold)); builder.down(); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java index f322b26bb00..7012121b4c9 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java @@ -129,7 +129,7 @@ class ElasticsearchJestHealthIndicatorTests { status); } else { - json = "{\n" + " \"error\": \"Server Error\",\n" + " \"status\": \"" + status + "\"\n" + "}"; + json = "{\n \"error\": \"Server Error\",\n \"status\": \"" + status + "\"\n}"; } searchResult.setJsonString(json); searchResult.setJsonObject(new JsonParser().parse(json).getAsJsonObject()); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchRestHealthIndicatorTest.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchRestHealthIndicatorTest.java index b4c0096527a..1ee35c49819 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchRestHealthIndicatorTest.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchRestHealthIndicatorTest.java @@ -137,7 +137,7 @@ class ElasticsearchRestHealthIndicatorTest { + "\"task_max_waiting_in_queue_millis\":0,\"active_shards_percent_as_number\":100.0}", status); } - return "{\n" + " \"error\": \"Server Error\",\n" + " \"status\": " + responseCode + "\n" + "}"; + return "{\n \"error\": \"Server Error\",\n \"status\": " + responseCode + "\n}"; } } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java index 4969e8f87fc..110a02df8c1 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java @@ -78,7 +78,7 @@ class WebEndpointDiscovererTests { load(TestWebEndpointExtensionConfiguration.class, (discoverer) -> assertThatIllegalStateException().isThrownBy(discoverer::getEndpoints) .withMessageContaining( - "Invalid extension 'endpointExtension': no endpoint found with id '" + "test'")); + "Invalid extension 'endpointExtension': no endpoint found with id 'test'")); } @Test diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java index b9c8f3904d3..7d47f160fda 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java @@ -82,7 +82,7 @@ class CompositeHealthIndicatorTests { assertThat(mapper.writeValueAsString(result)) .isEqualTo("{\"status\":\"UNKNOWN\",\"details\":{\"db\":{\"status\":\"UNKNOWN\"" + ",\"details\":{\"db1\":{\"status\":\"UNKNOWN\",\"details\"" - + ":{\"1\":\"1\"}},\"db2\":{\"status\":\"UNKNOWN\",\"details\"" + ":{\"2\":\"2\"}}}}}}"); + + ":{\"1\":\"1\"}},\"db2\":{\"status\":\"UNKNOWN\",\"details\":{\"2\":\"2\"}}}}}}"); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java index 725124f42a6..9ad94ff7f0d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java @@ -207,7 +207,7 @@ public class AutoConfigurationImportSelector implements DeferredImportSelector, message.append("\t- ").append(exclude).append(String.format("%n")); } throw new IllegalStateException(String.format( - "The following classes could not be excluded because they are" + " not auto-configuration classes:%n%s", + "The following classes could not be excluded because they are not auto-configuration classes:%n%s", message)); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationMetadataLoader.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationMetadataLoader.java index 9711f4fcaf1..a04a70b42ea 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationMetadataLoader.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationMetadataLoader.java @@ -33,7 +33,7 @@ import org.springframework.util.StringUtils; */ final class AutoConfigurationMetadataLoader { - protected static final String PATH = "META-INF/" + "spring-autoconfigure-metadata.properties"; + protected static final String PATH = "META-INF/spring-autoconfigure-metadata.properties"; private AutoConfigurationMetadataLoader() { } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java index 5bf26d8358e..520af8e4617 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java @@ -196,8 +196,8 @@ public abstract class AutoConfigurationPackages { else { if (logger.isDebugEnabled()) { String packageNames = StringUtils.collectionToCommaDelimitedString(this.packages); - logger.debug("@EnableAutoConfiguration was declared on a class " + "in the package '" - + packageNames + "'. Automatic @Repository and @Entity scanning is " + "enabled."); + logger.debug("@EnableAutoConfiguration was declared on a class in the package '" + packageNames + + "'. Automatic @Repository and @Entity scanning is enabled."); } } this.loggedBasePackageInfo = true; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java index 9bf7f68e901..79c688c5945 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java @@ -106,8 +106,8 @@ public class CacheAutoConfiguration { @Override public void afterPropertiesSet() { Assert.notNull(this.cacheManager.getIfAvailable(), - () -> "No cache manager could " + "be auto-configured, check your configuration (caching " - + "type is '" + this.cacheProperties.getType() + "')"); + () -> "No cache manager could be auto-configured, check your configuration (caching " + "type is '" + + this.cacheProperties.getType() + "')"); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java index 2647b40d799..8b28f70a70e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java @@ -405,7 +405,7 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat if (ex == null) { throw new IllegalStateException(message); } - throw new IllegalStateException(message + " and the attempt to deduce" + " the bean's type failed", ex); + throw new IllegalStateException(message + " and the attempt to deduce the bean's type failed", ex); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnResourceCondition.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnResourceCondition.java index f3188c1cb40..41f0f83733d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnResourceCondition.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnResourceCondition.java @@ -50,7 +50,7 @@ class OnResourceCondition extends SpringBootCondition { List locations = new ArrayList<>(); collectValues(locations, attributes.get("resources")); Assert.isTrue(!locations.isEmpty(), - "@ConditionalOnResource annotations must specify at " + "least one resource location"); + "@ConditionalOnResource annotations must specify at least one resource location"); List missing = new ArrayList<>(); for (String location : locations) { String resource = context.getEnvironment().resolvePlaceholders(location); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java index cb82ae3eb45..ad09dbc1cf9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java @@ -51,7 +51,7 @@ public abstract class SpringBootCondition implements Condition { } catch (NoClassDefFoundError ex) { throw new IllegalStateException("Could not evaluate condition on " + classOrMethodName + " due to " - + ex.getMessage() + " not " + "found. Make sure your own configuration does not rely on " + + ex.getMessage() + " not found. Make sure your own configuration does not rely on " + "that class. This can also happen if you are " + "@ComponentScanning a springframework package (e.g. if you " + "put a @ComponentScan in the default package by mistake)", ex); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java index f1ef130a000..9d94019acf9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java @@ -123,7 +123,7 @@ abstract class RedisConnectionConfiguration { nodes.add(new RedisNode(parts[0], Integer.valueOf(parts[1]))); } catch (RuntimeException ex) { - throw new IllegalStateException("Invalid redis sentinel " + "property '" + node + "'", ex); + throw new IllegalStateException("Invalid redis sentinel property '" + node + "'", ex); } } return nodes; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration.java index cb64718c6e2..a4e6c7098e2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration.java @@ -86,7 +86,7 @@ public class GroovyTemplateAutoConfiguration { if (!location.exists(this.applicationContext)) { logger.warn("Cannot find template location: " + location + " (please add some templates, check your Groovy " - + "configuration, or set spring.groovy.template." + "check-template-location=false)"); + + "configuration, or set spring.groovy.template.check-template-location=false)"); } } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastProperties.java index 74b69d48920..524dbbaf9c1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastProperties.java @@ -53,7 +53,7 @@ public class HazelcastProperties { return null; } Assert.isTrue(this.config.exists(), - () -> "Hazelcast configuration does not " + "exist '" + this.config.getDescription() + "'"); + () -> "Hazelcast configuration does not exist '" + this.config.getDescription() + "'"); return this.config; } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConverters.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConverters.java index f760671457f..b6bd8be3384 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConverters.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConverters.java @@ -177,7 +177,7 @@ public class HttpMessageConverters implements Iterable> private List> getDefaultConverters() { List> converters = new ArrayList<>(); - if (ClassUtils.isPresent("org.springframework.web.servlet.config.annotation." + "WebMvcConfigurationSupport", + if (ClassUtils.isPresent("org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport", null)) { converters.addAll(new WebMvcConfigurationSupport() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java index 6115989cb34..efa3f8a775d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java @@ -142,7 +142,7 @@ public class JacksonAutoConfiguration { if (logger.isWarnEnabled()) { logger.warn("spring.jackson.date-format could not be used to " + "configure formatting of Joda's DateTime. You may want " - + "to configure spring.jackson.joda-date-time-format as " + "well."); + + "to configure spring.jackson.joda-date-time-format as well."); } } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java index c270cbf7f51..8ce606a2961 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java @@ -70,7 +70,7 @@ class DataSourceBeanCreationFailureAnalyzer extends AbstractFailureAnalyzer "Cannot find changelog location: " + resource - + " (please add changelog or check your Liquibase " + "configuration)"); + + " (please add changelog or check your Liquibase configuration)"); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java index 27b2530c82a..ea72312dfd6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java @@ -107,7 +107,7 @@ public class ConditionEvaluationReportLoggingListener public void logAutoConfigurationReport(boolean isCrashReport) { if (this.report == null) { if (this.applicationContext == null) { - this.logger.info("Unable to provide the conditions report " + "due to missing ApplicationContext"); + this.logger.info("Unable to provide the conditions report due to missing ApplicationContext"); return; } this.report = ConditionEvaluationReport.get(this.applicationContext.getBeanFactory()); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java index b0adc5fe9ef..24aa30f9424 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java @@ -95,7 +95,7 @@ public class ReactiveMongoClientFactory { private MongoClient createCredentialNetworkMongoClient(MongoClientSettings settings) { Assert.state(this.properties.getUri() == null, - "Invalid mongo configuration, " + "either uri or host/port/credentials must be specified"); + "Invalid mongo configuration, either uri or host/port/credentials must be specified"); Builder builder = builder(settings); if (hasCustomCredentials()) { applyCredentials(builder); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfiguration.java index 5e947eb2d83..ac8bcbc1c6c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfiguration.java @@ -65,7 +65,7 @@ public class MustacheAutoConfiguration { TemplateLocation location = new TemplateLocation(this.mustache.getPrefix()); if (!location.exists(this.applicationContext)) { logger.warn("Cannot find template location: " + location - + " (please add some templates, check your Mustache " + "configuration, or set spring.mustache." + + " (please add some templates, check your Mustache configuration, or set spring.mustache." + "check-template-location=false)"); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.java index 8ccda940b1a..0e9d9938318 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.java @@ -182,8 +182,9 @@ class HibernateJpaConfiguration extends JpaBaseConfiguration { // NoClassDefFoundError can happen if Hibernate 4.2 is used and some // containers (e.g. JBoss EAP 6) wrap it in the superclass LinkageError if (!isUsingJndi()) { - throw new IllegalStateException("Unable to set Hibernate JTA " + "platform, are you using the correct " - + "version of Hibernate?", ex); + throw new IllegalStateException( + "Unable to set Hibernate JTA platform, are you using the correct " + "version of Hibernate?", + ex); } // Assume that Hibernate will use JNDI if (logger.isDebugEnabled()) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java index 41abac49a1e..4f9400ea31e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java @@ -219,7 +219,7 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware { if (this.jpaProperties.getOpenInView() == null) { logger.warn("spring.jpa.open-in-view is enabled by default. " + "Therefore, database queries may be performed during view " - + "rendering. Explicitly configure " + "spring.jpa.open-in-view to disable this warning"); + + "rendering. Explicitly configure spring.jpa.open-in-view to disable this warning"); } return new OpenEntityManagerInViewInterceptor(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java index 3446d52d346..d0c31438b64 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java @@ -30,16 +30,15 @@ class NonUniqueSessionRepositoryFailureAnalyzer extends AbstractFailureAnalyzer< protected FailureAnalysis analyze(Throwable rootFailure, NonUniqueSessionRepositoryException cause) { StringBuilder message = new StringBuilder(); message.append( - String.format("Multiple Spring Session store implementations are " + "available on the classpath:%n")); + String.format("Multiple Spring Session store implementations are available on the classpath:%n")); for (Class candidate : cause.getAvailableCandidates()) { message.append(String.format(" - %s%n", candidate.getName())); } StringBuilder action = new StringBuilder(); action.append(String.format("Consider any of the following:%n")); - action.append(String - .format(" - Define the `spring.session.store-type` " + "property to the store you want to use%n")); action.append( - String.format(" - Review your classpath and remove the unwanted " + "store implementation(s)%n")); + String.format(" - Define the `spring.session.store-type` property to the store you want to use%n")); + action.append(String.format(" - Review your classpath and remove the unwanted store implementation(s)%n")); return new FailureAnalysis(message.toString(), action.toString(), cause); } 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 8eebb50a24b..97183844258 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 @@ -295,7 +295,7 @@ public class ServerProperties { + "169\\.254\\.\\d{1,3}\\.\\d{1,3}|" // 169.254/16 + "127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|" // 127/8 + "172\\.1[6-9]{1}\\.\\d{1,3}\\.\\d{1,3}|" // 172.16/12 - + "172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|" + "172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3}|" // + + "172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3}|" // + "0:0:0:0:0:0:0:1|::1"; /** diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java index d1166265624..c6297b2ed9b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java @@ -170,7 +170,7 @@ class AutoConfigurationImportSelectorTests { @Test void nonAutoConfigurationPropertyExclusionsWhenPresentOnClassPathShouldThrowException() { this.environment.setProperty("spring.autoconfigure.exclude", - "org.springframework.boot.autoconfigure." + "AutoConfigurationImportSelectorTests.TestConfiguration"); + "org.springframework.boot.autoconfigure.AutoConfigurationImportSelectorTests.TestConfiguration"); assertThatIllegalStateException().isThrownBy(() -> selectImports(BasicEnableAutoConfiguration.class)); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java index 6f9e55e873f..25b6ac8db28 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java @@ -150,7 +150,7 @@ class RabbitPropertiesTests { @Test void determineUsernameReturnsUsernameOfFirstAddress() { - this.properties.setAddresses("user:secret@rabbit1.example.com:1234/alpha," + "rabbit2.example.com:2345/bravo"); + this.properties.setAddresses("user:secret@rabbit1.example.com:1234/alpha,rabbit2.example.com:2345/bravo"); assertThat(this.properties.determineUsername()).isEqualTo("user"); } @@ -163,7 +163,7 @@ class RabbitPropertiesTests { @Test void determineUsernameReturnsPropertyWhenFirstAddressHasNoUsername() { this.properties.setUsername("alice"); - this.properties.setAddresses("rabbit1.example.com:1234/alpha," + "user:secret@rabbit2.example.com:2345/bravo"); + this.properties.setAddresses("rabbit1.example.com:1234/alpha,user:secret@rabbit2.example.com:2345/bravo"); assertThat(this.properties.determineUsername()).isEqualTo("alice"); } @@ -180,7 +180,7 @@ class RabbitPropertiesTests { @Test void determinePasswordReturnsPasswordOfFirstAddress() { - this.properties.setAddresses("user:secret@rabbit1.example.com:1234/alpha," + "rabbit2.example.com:2345/bravo"); + this.properties.setAddresses("user:secret@rabbit1.example.com:1234/alpha,rabbit2.example.com:2345/bravo"); assertThat(this.properties.determinePassword()).isEqualTo("secret"); } @@ -193,7 +193,7 @@ class RabbitPropertiesTests { @Test void determinePasswordReturnsPropertyWhenFirstAddressHasNoPassword() { this.properties.setPassword("12345678"); - this.properties.setAddresses("rabbit1.example.com:1234/alpha," + "user:secret@rabbit2.example.com:2345/bravo"); + this.properties.setAddresses("rabbit1.example.com:1234/alpha,user:secret@rabbit2.example.com:2345/bravo"); assertThat(this.properties.determinePassword()).isEqualTo("12345678"); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java index 438bca9fca5..6b1ab35867d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java @@ -145,7 +145,7 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT @Test public void simpleCacheWithCustomizers() { this.contextRunner.withUserConfiguration(DefaultCacheAndCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "simple") + .withPropertyValues("spring.cache.type=simple") .run(verifyCustomizers("allCacheManagerCustomizer", "simpleCacheManagerCustomizer")); } @@ -182,7 +182,7 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT @Test public void genericCacheWithCustomizers() { this.contextRunner.withUserConfiguration(GenericCacheAndCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "generic") + .withPropertyValues("spring.cache.type=generic") .run(verifyCustomizers("allCacheManagerCustomizer", "genericCacheManagerCustomizer")); } @@ -209,7 +209,7 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT @Test public void couchbaseCacheWithCustomizers() { this.contextRunner.withUserConfiguration(CouchbaseCacheAndCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "couchbase") + .withPropertyValues("spring.cache.type=couchbase") .run(verifyCustomizers("allCacheManagerCustomizer", "couchbaseCacheManagerCustomizer")); } @@ -288,7 +288,7 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT @Test public void redisCacheWithCustomizers() { this.contextRunner.withUserConfiguration(RedisWithCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "redis") + .withPropertyValues("spring.cache.type=redis") .run(verifyCustomizers("allCacheManagerCustomizer", "redisCacheManagerCustomizer")); } @@ -437,7 +437,7 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT @Test public void hazelcastCacheWithCustomizers() { this.contextRunner.withUserConfiguration(HazelcastCacheAndCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "hazelcast") + .withPropertyValues("spring.cache.type=hazelcast") .run(verifyCustomizers("allCacheManagerCustomizer", "hazelcastCacheManagerCustomizer")); } @@ -541,7 +541,7 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT @Test public void infinispanCacheWithCustomizers() { this.contextRunner.withUserConfiguration(DefaultCacheAndCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "infinispan") + .withPropertyValues("spring.cache.type=infinispan") .run(verifyCustomizers("allCacheManagerCustomizer", "infinispanCacheManagerCustomizer")); } @@ -626,7 +626,7 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT @Test public void caffeineCacheWithCustomizers() { this.contextRunner.withUserConfiguration(DefaultCacheAndCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "caffeine") + .withPropertyValues("spring.cache.type=caffeine") .run(verifyCustomizers("allCacheManagerCustomizer", "caffeineCacheManagerCustomizer")); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache2CacheAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache2CacheAutoConfigurationTests.java index 3a21100a9fd..767ba7c62ea 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache2CacheAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache2CacheAutoConfigurationTests.java @@ -57,7 +57,7 @@ public class EhCache2CacheAutoConfigurationTests extends AbstractCacheAutoConfig @Test public void ehCacheWithCustomizers() { this.contextRunner.withUserConfiguration(DefaultCacheAndCustomizersConfiguration.class) - .withPropertyValues("spring.cache.type=" + "ehcache") + .withPropertyValues("spring.cache.type=ehcache") .run(verifyCustomizers("allCacheManagerCustomizer", "ehcacheCacheManagerCustomizer")); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java index 41fb3c5434a..453adaf11f8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionEvaluationReportTests.java @@ -201,7 +201,7 @@ class ConditionEvaluationReportTests { } assertThat(messages).areAtLeastOne(Matched.by(containsString("@ConditionalOnClass found required classes " + "'javax.servlet.Servlet', 'org.springframework.web.multipart." - + "support.StandardServletMultipartResolver', " + "'javax.servlet.MultipartConfigElement'"))); + + "support.StandardServletMultipartResolver', 'javax.servlet.MultipartConfigElement'"))); context.close(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java index 69c8180a6a8..9dd4c6ffce7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java @@ -158,21 +158,20 @@ class NoSuchBeanDefinitionFailureAnalyzerTests { private void assertDescriptionConstructorMissingType(FailureAnalysis analysis, Class component, int index, Class type) { String expected = String.format( - "Parameter %s of constructor in %s required a bean of " + "type '%s' that could not be found.", index, + "Parameter %s of constructor in %s required a bean of type '%s' that could not be found.", index, component.getName(), type.getName()); assertThat(analysis.getDescription()).startsWith(expected); } private void assertActionMissingType(FailureAnalysis analysis, Class type) { assertThat(analysis.getAction()).startsWith(String.format( - "Consider revisiting the entries above or defining a bean of type '%s' " + "in your configuration.", + "Consider revisiting the entries above or defining a bean of type '%s' in your configuration.", type.getName())); } private void assertActionMissingName(FailureAnalysis analysis, String name) { assertThat(analysis.getAction()).startsWith(String.format( - "Consider revisiting the entries above or defining a bean named '%s' " + "in your configuration.", - name)); + "Consider revisiting the entries above or defining a bean named '%s' in your configuration.", name)); } private void assertBeanMethodDisabled(FailureAnalysis analysis, String description, Class target, diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java index b20624e8152..27fa3f18cba 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java @@ -67,8 +67,7 @@ public class FreeMarkerAutoConfigurationTests { File emptyDirectory = new File(this.buildOutput.getTestResourcesLocation(), "empty-templates/empty-directory"); emptyDirectory.mkdirs(); this.contextRunner - .withPropertyValues( - "spring.freemarker.templateLoaderPath:" + "classpath:/empty-templates/empty-directory/") + .withPropertyValues("spring.freemarker.templateLoaderPath:classpath:/empty-templates/empty-directory/") .run((context) -> assertThat(output).doesNotContain("Cannot find template location")); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java index 5e07731b9f0..46811b2af95 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java @@ -80,8 +80,7 @@ class GroovyTemplateAutoConfigurationTests { @Test void emptyTemplateLocation() { new File(this.buildOutput.getTestResourcesLocation(), "empty-templates/empty-directory").mkdirs(); - registerAndRefreshContext( - "spring.groovy.template.resource-loader-path:" + "classpath:/templates/empty-directory/"); + registerAndRefreshContext("spring.groovy.template.resource-loader-path:classpath:/templates/empty-directory/"); } @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java index b5c0ab64bc0..87d15d0a025 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java @@ -66,15 +66,17 @@ class HazelcastAutoConfigurationClientTests { @Test void systemPropertyWithXml() { - this.contextRunner.withSystemProperties(HazelcastClientConfiguration.CONFIG_SYSTEM_PROPERTY - + "=classpath:org/springframework/boot/autoconfigure/hazelcast/" + "hazelcast-client-specific.xml") + this.contextRunner + .withSystemProperties(HazelcastClientConfiguration.CONFIG_SYSTEM_PROPERTY + + "=classpath:org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.xml") .run(assertSpecificHazelcastClient("explicit-xml")); } @Test void systemPropertyWithYaml() { - this.contextRunner.withSystemProperties(HazelcastClientConfiguration.CONFIG_SYSTEM_PROPERTY - + "=classpath:org/springframework/boot/autoconfigure/hazelcast/" + "hazelcast-client-specific.yaml") + this.contextRunner + .withSystemProperties(HazelcastClientConfiguration.CONFIG_SYSTEM_PROPERTY + + "=classpath:org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.yaml") .run(assertSpecificHazelcastClient("explicit-yaml")); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java index d10f49e77ea..37325b654fb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java @@ -59,7 +59,7 @@ class ProjectInfoAutoConfigurationTests { @Test void gitPropertiesFallbackWithGitPropertiesBean() { this.contextRunner.withUserConfiguration(CustomInfoPropertiesConfiguration.class).withPropertyValues( - "spring.info.git.location=" + "classpath:/org/springframework/boot/autoconfigure/info/git.properties") + "spring.info.git.location=classpath:/org/springframework/boot/autoconfigure/info/git.properties") .run((context) -> { GitProperties gitProperties = context.getBean(GitProperties.class); assertThat(gitProperties).isSameAs(context.getBean("customGitProperties")); @@ -115,8 +115,7 @@ class ProjectInfoAutoConfigurationTests { @Test void buildPropertiesCustomInvalidLocation() { - this.contextRunner - .withPropertyValues("spring.info.build.location=" + "classpath:/org/acme/no-build-info.properties") + this.contextRunner.withPropertyValues("spring.info.build.location=classpath:/org/acme/no-build-info.properties") .run((context) -> assertThat(context.getBeansOfType(BuildProperties.class)).hasSize(0)); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java index e63e230dafc..a1d3835a017 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java @@ -51,7 +51,7 @@ import static org.assertj.core.api.Assertions.assertThat; class DataSourceJmxConfigurationTests { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() - .withPropertyValues("spring.datasource.url=" + "jdbc:hsqldb:mem:test-" + UUID.randomUUID()) + .withPropertyValues("spring.datasource.url=jdbc:hsqldb:mem:test-" + UUID.randomUUID()) .withConfiguration(AutoConfigurations.of(JmxAutoConfiguration.class, DataSourceAutoConfiguration.class)); @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java index 4aee20fc1a8..81268761a8c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java @@ -60,8 +60,9 @@ class HikariDataSourceConfigurationTests { @Test void testDataSourceGenericPropertiesOverridden() { - this.contextRunner.withPropertyValues( - "spring.datasource.hikari.data-source-properties" + ".dataSourceClassName=org.h2.JDBCDataSource") + this.contextRunner + .withPropertyValues( + "spring.datasource.hikari.data-source-properties.dataSourceClassName=org.h2.JDBCDataSource") .run((context) -> { HikariDataSource ds = context.getBean(HikariDataSource.class); assertThat(ds.getDataSourceProperties().getProperty("dataSourceClassName")) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzerTests.java index a57b390298c..c75ee30c516 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzerTests.java @@ -40,7 +40,7 @@ class HikariDriverConfigurationFailureAnalyzerTests { FailureAnalysis failureAnalysis = performAnalysis(TestConfiguration.class); assertThat(failureAnalysis).isNotNull(); assertThat(failureAnalysis.getDescription()).isEqualTo( - "Configuration of the Hikari connection pool failed: " + "'dataSourceClassName' is not supported."); + "Configuration of the Hikari connection pool failed: 'dataSourceClassName' is not supported."); assertThat(failureAnalysis.getAction()).contains("Spring Boot auto-configures only a driver"); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListenerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListenerTests.java index 8f7c850e144..d986541b78f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListenerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListenerTests.java @@ -86,9 +86,8 @@ class ConditionEvaluationReportLoggingListenerTests { context.register(ErrorConfig.class); assertThatExceptionOfType(Exception.class).isThrownBy(context::refresh).satisfies((ex) -> this.initializer .onApplicationEvent(new ApplicationFailedEvent(new SpringApplication(), new String[0], context, ex))); - assertThat(output) - .contains("Error starting" + " ApplicationContext. To display the conditions report re-run" - + " your application with 'debug' enabled."); + assertThat(output).contains("Error starting ApplicationContext. To display the conditions report re-run" + + " your application with 'debug' enabled."); } @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java index 0e59b9bd682..b5a858d2e75 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java @@ -94,7 +94,7 @@ class MongoClientFactoryTests { @Test void uriCanBeCustomized() { MongoProperties properties = new MongoProperties(); - properties.setUri("mongodb://user:secret@mongo1.example.com:12345," + "mongo2.example.com:23456/test"); + properties.setUri("mongodb://user:secret@mongo1.example.com:12345,mongo2.example.com:23456/test"); MongoClient client = createMongoClient(properties); List allAddresses = getAllAddresses(client); assertThat(allAddresses).hasSize(2); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java index bc60f0d15a0..aa1d9801fd8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java @@ -98,7 +98,7 @@ class ReactiveMongoClientFactoryTests { @Test void uriCanBeCustomized() { MongoProperties properties = new MongoProperties(); - properties.setUri("mongodb://user:secret@mongo1.example.com:12345," + "mongo2.example.com:23456/test"); + properties.setUri("mongodb://user:secret@mongo1.example.com:12345,mongo2.example.com:23456/test"); MongoClient client = createMongoClient(properties); List allAddresses = extractServerAddresses(client); assertThat(allAddresses).hasSize(2); @@ -123,7 +123,7 @@ class ReactiveMongoClientFactoryTests { properties.setUsername("user"); properties.setPassword("secret".toCharArray()); assertThatIllegalStateException().isThrownBy(() -> createMongoClient(properties)).withMessageContaining( - "Invalid mongo configuration, " + "either uri or host/port/credentials must be specified"); + "Invalid mongo configuration, either uri or host/port/credentials must be specified"); } @Test @@ -133,7 +133,7 @@ class ReactiveMongoClientFactoryTests { properties.setHost("localhost"); properties.setPort(4567); assertThatIllegalStateException().isThrownBy(() -> createMongoClient(properties)).withMessageContaining( - "Invalid mongo configuration, " + "either uri or host/port/credentials must be specified"); + "Invalid mongo configuration, either uri or host/port/credentials must be specified"); } @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java index b54ec168860..2545ba1ce6e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java @@ -232,7 +232,7 @@ class TomcatWebServerFactoryCustomizerTests { + "169\\.254\\.\\d{1,3}\\.\\d{1,3}|" // 169.254/16 + "127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|" // 127/8 + "172\\.1[6-9]{1}\\.\\d{1,3}\\.\\d{1,3}|" // 172.16/12 - + "172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|" + "172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3}|" // + + "172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3}|" // + "0:0:0:0:0:0:0:1|::1"; assertThat(remoteIpValve.getInternalProxies()).isEqualTo(expectedInternalProxies); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryAutoConfigurationTests.java index 59218e86792..f8e9487058d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryAutoConfigurationTests.java @@ -90,7 +90,7 @@ class ReactiveWebServerFactoryAutoConfigurationTests { TooManyHttpHandlers.class) .run((context) -> assertThat(context.getStartupFailure()) .isInstanceOf(ApplicationContextException.class) - .hasMessageContaining("multiple HttpHandler beans : " + "httpHandler,additionalHttpHandler")); + .hasMessageContaining("multiple HttpHandler beans : httpHandler,additionalHttpHandler")); } @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java index c271f96c2b8..771ced71632 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java @@ -73,7 +73,7 @@ class ErrorMvcAutoConfigurationTests { webRequest.getResponse()); assertThat(output).contains("Cannot render error page for request [/path] " + "and exception [Exception message] as the response has " - + "already been committed. As a result, the response may " + "have the wrong status code."); + + "already been committed. As a result, the response may have the wrong status code."); }); } diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/ArchiveCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/ArchiveCommand.java index cc719ce2321..febc69990da 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/ArchiveCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/ArchiveCommand.java @@ -110,7 +110,7 @@ abstract class ArchiveCommand extends OptionParsingCommand { @Override protected void doOptions() { this.includeOption = option("include", - "Pattern applied to directories on the classpath to find files to " + "include in the resulting ") + "Pattern applied to directories on the classpath to find files to include in the resulting ") .withRequiredArg().withValuesSeparatedBy(",").defaultsTo(""); this.excludeOption = option("exclude", "Pattern applied to directories on the classpath to find files to " + "exclude from the resulting " + this.type).withRequiredArg().withValuesSeparatedBy(",") @@ -120,8 +120,8 @@ abstract class ArchiveCommand extends OptionParsingCommand { @Override protected ExitStatus run(OptionSet options) throws Exception { List nonOptionArguments = new ArrayList(options.nonOptionArguments()); - Assert.isTrue(nonOptionArguments.size() >= 2, () -> "The name of the " + "resulting " + this.type - + " and at least one source file must be " + "specified"); + Assert.isTrue(nonOptionArguments.size() >= 2, + () -> "The name of the resulting " + this.type + " and at least one source file must be specified"); File output = new File((String) nonOptionArguments.remove(0)); Assert.isTrue(output.getName().toLowerCase(Locale.ENGLISH).endsWith("." + this.type), diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/JarCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/JarCommand.java index cee7698aa14..b6c57904949 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/JarCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/JarCommand.java @@ -32,8 +32,7 @@ import org.springframework.boot.loader.tools.LibraryScope; public class JarCommand extends ArchiveCommand { public JarCommand() { - super("jar", "Create a self-contained executable jar " + "file from a Spring Groovy script", - new JarOptionHandler()); + super("jar", "Create a self-contained executable jar file from a Spring Groovy script", new JarOptionHandler()); } private static final class JarOptionHandler extends ArchiveOptionHandler { diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/WarCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/WarCommand.java index 4becf43381e..a10c87acd42 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/WarCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/WarCommand.java @@ -36,8 +36,7 @@ import org.springframework.boot.loader.tools.LibraryScope; public class WarCommand extends ArchiveCommand { public WarCommand() { - super("war", "Create a self-contained executable war " + "file from a Spring Groovy script", - new WarOptionHandler()); + super("war", "Create a self-contained executable war file from a Spring Groovy script", new WarOptionHandler()); } private static final class WarOptionHandler extends ArchiveOptionHandler { @@ -57,7 +56,7 @@ public class WarCommand extends ArchiveCommand { @Override protected void addCliClasses(JarWriter writer) throws IOException { - addClass(writer, null, "org.springframework.boot." + "cli.app.SpringApplicationWebApplicationInitializer"); + addClass(writer, null, "org.springframework.boot.cli.app.SpringApplicationWebApplicationInitializer"); super.addCliClasses(writer); } diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java index 25d00c4f5eb..0c62b487f42 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java @@ -47,7 +47,7 @@ public class InitCommand extends OptionParsingCommand { } public InitCommand(InitOptionHandler handler) { - super("init", "Initialize a new project using Spring " + "Initializr (start.spring.io)", handler); + super("init", "Initialize a new project using Spring Initializr (start.spring.io)", handler); } @Override @@ -140,7 +140,7 @@ public class InitCommand extends OptionParsingCommand { this.packageName = option("package-name", "Package name").withRequiredArg(); this.type = option(Arrays.asList("type", "t"), "Project type. Not normally needed if you use --build " - + "and/or --format. Check the capabilities of the service " + "(--list) for more details") + + "and/or --format. Check the capabilities of the service (--list) for more details") .withRequiredArg(); this.packaging = option(Arrays.asList("packaging", "p"), "Project packaging (for example 'jar')") .withRequiredArg(); @@ -155,7 +155,7 @@ public class InitCommand extends OptionParsingCommand { this.bootVersion = option(Arrays.asList("boot-version", "b"), "Spring Boot version (for example '1.2.0.RELEASE')").withRequiredArg(); this.dependencies = option(Arrays.asList("dependencies", "d"), - "Comma-separated list of dependency identifiers to include in the " + "generated project") + "Comma-separated list of dependency identifiers to include in the generated project") .withRequiredArg(); } diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerator.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerator.java index dfffb38fd93..e44c31e3d28 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerator.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerator.java @@ -58,7 +58,7 @@ class ProjectGenerator { } if (fileName == null) { throw new ReportableException("Could not save the project, the server did not set a preferred " - + "file name and no location was set. Specify the output location " + "for the project."); + + "file name and no location was set. Specify the output location for the project."); } writeProject(response, fileName, force); } diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java index c8bc37ab96f..c1036fbad1a 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java @@ -52,7 +52,7 @@ public class InstallCommand extends OptionParsingCommand { protected ExitStatus run(OptionSet options) throws Exception { List args = (List) options.nonOptionArguments(); Assert.notEmpty(args, - "Please specify at least one " + "dependency, in the form group:artifact:version, to install"); + "Please specify at least one dependency, in the form group:artifact:version, to install"); try { new Installer(options, this).install(args); } diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java index a73cd4b583e..9d91085594d 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java @@ -142,7 +142,7 @@ public class Shell { String version = getClass().getPackage().getImplementationVersion(); version = (version != null) ? " (v" + version + ")" : ""; System.out.println(ansi("Spring Boot", Code.BOLD).append(version, Code.FAINT)); - System.out.println(ansi("Hit TAB to complete. Type 'help' and hit " + "RETURN for help, and 'exit' to quit.")); + System.out.println(ansi("Hit TAB to complete. Type 'help' and hit RETURN for help, and 'exit' to quit.")); } private void runInputLoop() throws Exception { diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyManagementBomTransformation.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyManagementBomTransformation.java index 8040ebc3bec..b0d778e097b 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyManagementBomTransformation.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyManagementBomTransformation.java @@ -135,7 +135,7 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans && ((ConstantExpression) valueExpression).getValue() instanceof String) { return Arrays.asList((ConstantExpression) valueExpression); } - reportError("@DependencyManagementBom requires an inline constant that is a " + "string or a string array", + reportError("@DependencyManagementBom requires an inline constant that is a string or a string array", valueExpression); return Collections.emptyList(); } @@ -148,7 +148,7 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans expressions.add((ConstantExpression) expression); } else { - reportError("Each entry in the array must be an " + "inline string constant", expression); + reportError("Each entry in the array must be an inline string constant", expression); } } return expressions; diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java index 58fd893997d..9e17200763a 100755 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java @@ -84,7 +84,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro environment.getPropertySources().addLast(new MapPropertySource("devtools", PROPERTIES)); } if (isWebApplication(environment) && !environment.containsProperty(WEB_LOGGING)) { - logger.info("For additional web related logging consider " + "setting the '" + WEB_LOGGING + logger.info("For additional web related logging consider setting the '" + WEB_LOGGING + "' property to 'DEBUG'"); } } diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/Connection.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/Connection.java index 11b1ce45eba..43229f3050a 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/Connection.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/Connection.java @@ -88,7 +88,7 @@ class Connection { String accept = getWebsocketAcceptResponse(); this.outputStream.writeHeaders("HTTP/1.1 101 Switching Protocols", "Upgrade: websocket", "Connection: Upgrade", "Sec-WebSocket-Accept: " + accept); - new Frame("{\"command\":\"hello\",\"protocols\":" + "[\"http://livereload.com/protocols/official-7\"]," + new Frame("{\"command\":\"hello\",\"protocols\":[\"http://livereload.com/protocols/official-7\"]," + "\"serverName\":\"spring-boot\"}").write(this.outputStream); Thread.sleep(100); this.webSocket = true; diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/client/RemoteClientConfiguration.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/client/RemoteClientConfiguration.java index 51f9cd06ff1..9073ea444fa 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/client/RemoteClientConfiguration.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/client/RemoteClientConfiguration.java @@ -104,7 +104,7 @@ public class RemoteClientConfiguration implements InitializingBean { String secretHeaderName = remoteProperties.getSecretHeaderName(); String secret = remoteProperties.getSecret(); Assert.state(secret != null, - "The environment value 'spring.devtools.remote.secret' " + "is required to secure your connection."); + "The environment value 'spring.devtools.remote.secret' is required to secure your connection."); return new HttpHeaderInterceptor(secretHeaderName, secret); } diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolver.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolver.java index 62e37e4478b..47178c6adf5 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolver.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolver.java @@ -59,7 +59,7 @@ final class ClassLoaderFilesResourcePatternResolver implements ResourcePatternRe private static final String[] LOCATION_PATTERN_PREFIXES = { CLASSPATH_ALL_URL_PREFIX, CLASSPATH_URL_PREFIX }; - private static final String WEB_CONTEXT_CLASS = "org.springframework.web.context." + "WebApplicationContext"; + private static final String WEB_CONTEXT_CLASS = "org.springframework.web.context.WebApplicationContext"; private final ResourcePatternResolver patternResolverDelegate; diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java index ed7f6336c63..592a4e92f0b 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/settings/DevToolsSettings.java @@ -115,8 +115,7 @@ public class DevToolsSettings { return settings; } catch (Exception ex) { - throw new IllegalStateException("Unable to load devtools settings from " + "location [" + location + "]", - ex); + throw new IllegalStateException("Unable to load devtools settings from location [" + location + "]", ex); } } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/ConnectionInputStreamTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/ConnectionInputStreamTests.java index eb42d7d65b6..d93077831b7 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/ConnectionInputStreamTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/ConnectionInputStreamTests.java @@ -42,7 +42,7 @@ class ConnectionInputStreamTests { for (int i = 0; i < 100; i++) { header += "x-something-" + i + ": xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; } - String data = header + "\r\n\r\n" + "content\r\n"; + String data = header + "\r\n\r\ncontent\r\n"; ConnectionInputStream inputStream = new ConnectionInputStream(new ByteArrayInputStream(data.getBytes())); assertThat(inputStream.readHeader()).isEqualTo(header); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/DefaultSourceFolderUrlFilterTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/DefaultSourceFolderUrlFilterTests.java index 48d2565ecd2..67248f70db2 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/DefaultSourceFolderUrlFilterTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/DefaultSourceFolderUrlFilterTests.java @@ -71,13 +71,13 @@ class DefaultSourceFolderUrlFilterTests { @Test void skippedProjects() throws Exception { - String sourceFolder = "/Users/me/code/spring-boot-samples/" + "spring-boot-sample-devtools"; - URL jarUrl = new URL("jar:file:/Users/me/tmp/" + "spring-boot-sample-devtools-1.3.0.BUILD-SNAPSHOT.jar!/"); + String sourceFolder = "/Users/me/code/spring-boot-samples/spring-boot-sample-devtools"; + URL jarUrl = new URL("jar:file:/Users/me/tmp/spring-boot-sample-devtools-1.3.0.BUILD-SNAPSHOT.jar!/"); assertThat(this.filter.isMatch(sourceFolder, jarUrl)).isTrue(); - URL nestedJarUrl = new URL("jar:file:/Users/me/tmp/" + "spring-boot-sample-devtools-1.3.0.BUILD-SNAPSHOT.jar!/" + URL nestedJarUrl = new URL("jar:file:/Users/me/tmp/spring-boot-sample-devtools-1.3.0.BUILD-SNAPSHOT.jar!/" + "lib/spring-boot-1.3.0.BUILD-SNAPSHOT.jar!/"); assertThat(this.filter.isMatch(sourceFolder, nestedJarUrl)).isFalse(); - URL fileUrl = new URL("file:/Users/me/tmp/" + "spring-boot-sample-devtools-1.3.0.BUILD-SNAPSHOT.jar"); + URL fileUrl = new URL("file:/Users/me/tmp/spring-boot-sample-devtools-1.3.0.BUILD-SNAPSHOT.jar"); assertThat(this.filter.isMatch(sourceFolder, fileUrl)).isTrue(); } diff --git a/spring-boot-project/spring-boot-properties-migrator/src/main/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReport.java b/spring-boot-project/spring-boot-properties-migrator/src/main/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReport.java index c0548d0ec07..d31b2e4781b 100644 --- a/spring-boot-project/spring-boot-properties-migrator/src/main/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReport.java +++ b/spring-boot-project/spring-boot-properties-migrator/src/main/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReport.java @@ -45,8 +45,8 @@ class PropertiesMigrationReport { return null; } StringBuilder report = new StringBuilder(); - report.append(String.format( - "%nThe use of configuration keys that have been " + "renamed was found in the environment:%n%n")); + report.append(String + .format("%nThe use of configuration keys that have been renamed was found in the environment:%n%n")); append(report, content); report.append(String.format("%n")); report.append("Each configuration key has been temporarily mapped to its " @@ -68,10 +68,10 @@ class PropertiesMigrationReport { } StringBuilder report = new StringBuilder(); report.append(String.format( - "%nThe use of configuration keys that are no longer " + "supported was found in the environment:%n%n")); + "%nThe use of configuration keys that are no longer supported was found in the environment:%n%n")); append(report, content); report.append(String.format("%n")); - report.append("Please refer to the migration guide or reference guide for " + "potential alternatives."); + report.append("Please refer to the migration guide or reference guide for potential alternatives."); report.append(String.format("%n")); return report.toString(); } diff --git a/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReporterTests.java b/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReporterTests.java index 34b4501a312..4fed9c1902f 100644 --- a/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReporterTests.java +++ b/spring-boot-project/spring-boot-properties-migrator/src/test/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReporterTests.java @@ -130,7 +130,7 @@ class PropertiesMigrationReporterTests { String report = createErrorReport(loadRepository("metadata/type-conversion-metadata.json")); assertThat(report).isNotNull(); assertThat(report).containsSubsequence("Property source 'test'", "wrong.inconvertible", "Line: 1", - "Reason: Replacement key " + "'test.inconvertible' uses an incompatible target type"); + "Reason: Replacement key 'test.inconvertible' uses an incompatible target type"); } @Test diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfiguration.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfiguration.java index 6c2d9b57a4f..bf5183206d0 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfiguration.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfiguration.java @@ -79,7 +79,7 @@ public class TestDatabaseAutoConfiguration { @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException { Assert.isInstanceOf(ConfigurableListableBeanFactory.class, registry, - "Test Database Auto-configuration can only be " + "used with a ConfigurableListableBeanFactory"); + "Test Database Auto-configuration can only be used with a ConfigurableListableBeanFactory"); process(registry, (ConfigurableListableBeanFactory) registry); } @@ -108,7 +108,7 @@ public class TestDatabaseAutoConfiguration { private BeanDefinitionHolder getDataSourceBeanDefinition(ConfigurableListableBeanFactory beanFactory) { String[] beanNames = beanFactory.getBeanNamesForType(DataSource.class); if (ObjectUtils.isEmpty(beanNames)) { - logger.warn("No DataSource beans found, " + "embedded version will not be used"); + logger.warn("No DataSource beans found, embedded version will not be used"); return null; } if (beanNames.length == 1) { @@ -122,7 +122,7 @@ public class TestDatabaseAutoConfiguration { return new BeanDefinitionHolder(beanDefinition, beanName); } } - logger.warn("No primary DataSource found, " + "embedded version will not be used"); + logger.warn("No primary DataSource found, embedded version will not be used"); return null; } @@ -179,7 +179,7 @@ public class TestDatabaseAutoConfiguration { Assert.state(connection != EmbeddedDatabaseConnection.NONE, "Failed to replace DataSource with an embedded database for tests. If " + "you want an embedded database please put a supported one " - + "on the classpath or tune the replace attribute of " + "@AutoConfigureTestDatabase."); + + "on the classpath or tune the replace attribute of @AutoConfigureTestDatabase."); return new EmbeddedDatabaseBuilder().generateUniqueName(true).setType(connection.getType()).build(); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/MockRestServiceServerAutoConfiguration.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/MockRestServiceServerAutoConfiguration.java index fc4f0c40c29..2c47ef8f096 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/MockRestServiceServerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/MockRestServiceServerAutoConfiguration.java @@ -108,9 +108,9 @@ public class MockRestServiceServerAutoConfiguration { private RequestExpectationManager getDelegate() { Map expectationManagers = this.customizer.getExpectationManagers(); Assert.state(!expectationManagers.isEmpty(), "Unable to use auto-configured MockRestServiceServer since " - + "MockServerRestTemplateCustomizer has not been bound to " + "a RestTemplate"); + + "MockServerRestTemplateCustomizer has not been bound to a RestTemplate"); Assert.state(expectationManagers.size() == 1, "Unable to use auto-configured MockRestServiceServer since " - + "MockServerRestTemplateCustomizer has been bound to " + "more than one RestTemplate"); + + "MockServerRestTemplateCustomizer has been bound to more than one RestTemplate"); return expectationManagers.values().iterator().next(); } 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 9fb88de2848..ab3e1046879 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 @@ -88,8 +88,8 @@ public class SpringBootContextLoader extends AbstractContextLoader { Class[] configClasses = config.getClasses(); String[] configLocations = config.getLocations(); Assert.state(!ObjectUtils.isEmpty(configClasses) || !ObjectUtils.isEmpty(configLocations), - () -> "No configuration classes " + "or locations found in @SpringApplicationConfiguration. " - + "For default configuration detection to work you need " + "Spring 4.0.3 or better (found " + () -> "No configuration classes or locations found in @SpringApplicationConfiguration. " + + "For default configuration detection to work you need Spring 4.0.3 or better (found " + SpringVersion.getVersion() + ")."); SpringApplication application = getSpringApplication(); application.setMainApplicationClass(config.getTestClass()); @@ -244,7 +244,7 @@ public class SpringBootContextLoader extends AbstractContextLoader { @Override public ApplicationContext loadContext(String... locations) throws Exception { throw new UnsupportedOperationException( - "SpringApplicationContextLoader " + "does not support the loadContext(String...) method"); + "SpringApplicationContextLoader does not support the loadContext(String...) method"); } @Override diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java index d7956977d30..4fc0c56c578 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java @@ -85,7 +85,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr private static final String REACTIVE_WEB_ENVIRONMENT_CLASS = "org.springframework." + "web.reactive.DispatcherHandler"; - private static final String MVC_WEB_ENVIRONMENT_CLASS = "org.springframework." + "web.servlet.DispatcherServlet"; + private static final String MVC_WEB_ENVIRONMENT_CLASS = "org.springframework.web.servlet.DispatcherServlet"; private static final String JERSEY_WEB_ENVIRONMENT_CLASS = "org.glassfish.jersey.server.ResourceConfig"; @@ -232,7 +232,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr Class found = new AnnotatedClassFinder(SpringBootConfiguration.class) .findFromClass(mergedConfig.getTestClass()); Assert.state(found != null, "Unable to find a @SpringBootConfiguration, you need to use " - + "@ContextConfiguration or @SpringBootTest(classes=...) " + "with your test"); + + "@ContextConfiguration or @SpringBootTest(classes=...) with your test"); logger.info("Found @SpringBootConfiguration " + found.getName() + " for test " + mergedConfig.getTestClass()); return merge(found, classes); } @@ -327,7 +327,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr .from(testClass, SearchStrategy.INHERITED_ANNOTATIONS).isPresent(WebAppConfiguration.class)) { throw new IllegalStateException("@WebAppConfiguration should only be used " + "with @SpringBootTest when @SpringBootTest is configured with a " - + "mock web environment. Please remove @WebAppConfiguration or " + "reconfigure @SpringBootTest."); + + "mock web environment. Please remove @WebAppConfiguration or reconfigure @SpringBootTest."); } } diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java index f065c338953..6fcc2cf23bb 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java @@ -69,12 +69,12 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa private void logDuplicateJsonObjectsWarning(List jsonObjects) { StringBuilder message = new StringBuilder( - String.format("%n%nFound multiple occurrences of" + " org.json.JSONObject on the class path:%n%n")); + String.format("%n%nFound multiple occurrences of org.json.JSONObject on the class path:%n%n")); for (URL jsonObject : jsonObjects) { message.append(String.format("\t%s%n", jsonObject)); } - message.append(String - .format("%nYou may wish to exclude one of them to ensure" + " predictable runtime behavior%n")); + message.append( + String.format("%nYou may wish to exclude one of them to ensure predictable runtime behavior%n")); this.logger.warn(message); } diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessor.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessor.java index 0f348870354..d4ed8de0c67 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessor.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessor.java @@ -125,7 +125,7 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { Assert.isInstanceOf(BeanDefinitionRegistry.class, beanFactory, - "@MockBean can only be used on bean factories that " + "implement BeanDefinitionRegistry"); + "@MockBean can only be used on bean factories that implement BeanDefinitionRegistry"); postProcessBeanFactory(beanFactory, (BeanDefinitionRegistry) beanFactory); } diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java index 67aea9ae501..6f180f6a6dc 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizer.java @@ -96,9 +96,9 @@ public class MockServerRestTemplateCustomizer implements RestTemplateCustomizer public MockRestServiceServer getServer() { Assert.state(!this.servers.isEmpty(), "Unable to return a single MockRestServiceServer since " - + "MockServerRestTemplateCustomizer has not been bound to " + "a RestTemplate"); + + "MockServerRestTemplateCustomizer has not been bound to a RestTemplate"); Assert.state(this.servers.size() == 1, "Unable to return a single MockRestServiceServer since " - + "MockServerRestTemplateCustomizer has been bound to " + "more than one RestTemplate"); + + "MockServerRestTemplateCustomizer has been bound to more than one RestTemplate"); return this.servers.values().iterator().next(); } diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java index 566da7fb48d..5931b9cff7f 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertProviderTests.java @@ -178,7 +178,7 @@ class ApplicationContextAssertProviderTests { void toStringWhenContextFailsToStartShouldReturnSimpleString() { ApplicationContextAssertProvider context = get(this.startupFailureSupplier); assertThat(context.toString()).isEqualTo("Unstarted application context " - + "org.springframework.context.ApplicationContext" + "[startupFailure=java.lang.RuntimeException]"); + + "org.springframework.context.ApplicationContext[startupFailure=java.lang.RuntimeException]"); } @Test diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/bootstrap/SpringBootTestContextBootstrapperTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/bootstrap/SpringBootTestContextBootstrapperTests.java index 5fafbc2b502..a64bdd0ca22 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/bootstrap/SpringBootTestContextBootstrapperTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/bootstrap/SpringBootTestContextBootstrapperTests.java @@ -42,7 +42,7 @@ class SpringBootTestContextBootstrapperTests { .isThrownBy(() -> buildTestContext(SpringBootTestNonMockWebEnvironmentAndWebAppConfiguration.class)) .withMessageContaining("@WebAppConfiguration should only be used with " + "@SpringBootTest when @SpringBootTest is configured with a mock web " - + "environment. Please remove @WebAppConfiguration or reconfigure " + "@SpringBootTest."); + + "environment. Please remove @WebAppConfiguration or reconfigure @SpringBootTest."); } @Test diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessorTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessorTests.java index 85c8ec7cfc4..6050aecbfcc 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessorTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessorTests.java @@ -49,7 +49,7 @@ class MockitoPostProcessorTests { context.register(MultipleBeans.class); assertThatIllegalStateException().isThrownBy(context::refresh) .withMessageContaining("Unable to register mock bean " + ExampleService.class.getName() - + " expected a single matching bean to replace " + "but found [example1, example2]"); + + " expected a single matching bean to replace but found [example1, example2]"); } @Test @@ -59,7 +59,7 @@ class MockitoPostProcessorTests { context.register(MultipleQualifiedBeans.class); assertThatIllegalStateException().isThrownBy(context::refresh) .withMessageContaining("Unable to register mock bean " + ExampleService.class.getName() - + " expected a single matching bean to replace " + "but found [example1, example3]"); + + " expected a single matching bean to replace but found [example1, example3]"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/main/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessor.java b/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/main/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessor.java index 08af7321559..efefc3c2bd4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/main/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessor.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/main/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessor.java @@ -61,7 +61,7 @@ import javax.tools.StandardLocation; "org.springframework.boot.autoconfigure.AutoConfigureOrder" }) public class AutoConfigureAnnotationProcessor extends AbstractProcessor { - protected static final String PROPERTIES_PATH = "META-INF/" + "spring-autoconfigure-metadata.properties"; + protected static final String PROPERTIES_PATH = "META-INF/spring-autoconfigure-metadata.properties"; private final Map annotations; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java b/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java index 59d5138721b..39ae4e94782 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java @@ -52,17 +52,16 @@ class AutoConfigureAnnotationProcessorTests { Properties properties = compile(TestClassConfiguration.class); assertThat(properties).hasSize(6); assertThat(properties).containsEntry( - "org.springframework.boot.autoconfigureprocessor." + "TestClassConfiguration.ConditionalOnClass", + "org.springframework.boot.autoconfigureprocessor.TestClassConfiguration.ConditionalOnClass", "java.io.InputStream,org.springframework.boot.autoconfigureprocessor." + "TestClassConfiguration$Nested,org.springframework.foo"); + assertThat(properties).containsKey("org.springframework.boot.autoconfigureprocessor.TestClassConfiguration"); assertThat(properties) - .containsKey("org.springframework.boot.autoconfigureprocessor." + "TestClassConfiguration"); - assertThat(properties).containsKey( - "org.springframework.boot.autoconfigureprocessor." + "TestClassConfiguration.Configuration"); - assertThat(properties).doesNotContainKey( - "org.springframework.boot.autoconfigureprocessor." + "TestClassConfiguration$Nested"); + .containsKey("org.springframework.boot.autoconfigureprocessor.TestClassConfiguration.Configuration"); + assertThat(properties) + .doesNotContainKey("org.springframework.boot.autoconfigureprocessor.TestClassConfiguration$Nested"); assertThat(properties).containsEntry( - "org.springframework.boot.autoconfigureprocessor." + "TestClassConfiguration.ConditionalOnBean", + "org.springframework.boot.autoconfigureprocessor.TestClassConfiguration.ConditionalOnBean", "java.io.OutputStream"); assertThat(properties).containsEntry("org.springframework.boot.autoconfigureprocessor." + "TestClassConfiguration.ConditionalOnSingleCandidate", "java.io.OutputStream"); @@ -89,23 +88,23 @@ class AutoConfigureAnnotationProcessorTests { } } assertThat(matching).hasSize(2) - .contains("org.springframework.boot.autoconfigureprocessor." + "TestMethodConfiguration") - .contains("org.springframework.boot.autoconfigureprocessor." + "TestMethodConfiguration.Configuration"); + .contains("org.springframework.boot.autoconfigureprocessor.TestMethodConfiguration") + .contains("org.springframework.boot.autoconfigureprocessor.TestMethodConfiguration.Configuration"); } @Test void annotatedClassWithOrder() throws Exception { Properties properties = compile(TestOrderedClassConfiguration.class); assertThat(properties).containsEntry( - "org.springframework.boot.autoconfigureprocessor." + "TestOrderedClassConfiguration.ConditionalOnClass", + "org.springframework.boot.autoconfigureprocessor.TestOrderedClassConfiguration.ConditionalOnClass", "java.io.InputStream,java.io.OutputStream"); assertThat(properties).containsEntry("org.springframework.boot.autoconfigureprocessor." + "TestOrderedClassConfiguration.AutoConfigureBefore", "test.before1,test.before2"); assertThat(properties).containsEntry( - "org.springframework.boot.autoconfigureprocessor." + "TestOrderedClassConfiguration.AutoConfigureAfter", + "org.springframework.boot.autoconfigureprocessor.TestOrderedClassConfiguration.AutoConfigureAfter", "java.io.ObjectInputStream"); assertThat(properties).containsEntry( - "org.springframework.boot.autoconfigureprocessor." + "TestOrderedClassConfiguration.AutoConfigureOrder", + "org.springframework.boot.autoconfigureprocessor.TestOrderedClassConfiguration.AutoConfigureOrder", "123"); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/Deprecation.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/Deprecation.java index f9bb2eb8184..1afc69d0b83 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/Deprecation.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/Deprecation.java @@ -90,7 +90,7 @@ public class Deprecation implements Serializable { @Override public String toString() { - return "Deprecation{" + "level='" + this.level + '\'' + ", reason='" + this.reason + '\'' + ", replacement='" + return "Deprecation{level='" + this.level + '\'' + ", reason='" + this.reason + '\'' + ", replacement='" + this.replacement + '\'' + '}'; } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueHint.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueHint.java index 0608fdc51f6..2f9e96617d1 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueHint.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueHint.java @@ -74,7 +74,7 @@ public class ValueHint implements Serializable { @Override public String toString() { - return "ValueHint{" + "value=" + this.value + ", description='" + this.description + '\'' + '}'; + return "ValueHint{value=" + this.value + ", description='" + this.description + '\'' + '}'; } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueProvider.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueProvider.java index d6064f877fb..73383926b2b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueProvider.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ValueProvider.java @@ -59,7 +59,7 @@ public class ValueProvider implements Serializable { @Override public String toString() { - return "ValueProvider{" + "name='" + this.name + ", parameters=" + this.parameters + '}'; + return "ValueProvider{name='" + this.name + ", parameters=" + this.parameters + '}'; } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/test/java/org/springframework/boot/configurationmetadata/SentenceExtractorTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/test/java/org/springframework/boot/configurationmetadata/SentenceExtractorTests.java index 4c30673e523..95b2fe9d721 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/test/java/org/springframework/boot/configurationmetadata/SentenceExtractorTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/test/java/org/springframework/boot/configurationmetadata/SentenceExtractorTests.java @@ -33,7 +33,7 @@ class SentenceExtractorTests { @Test void extractFirstSentence() { - String sentence = this.extractor.getFirstSentence("My short " + "description. More stuff."); + String sentence = this.extractor.getFirstSentence("My short description. More stuff."); assertThat(sentence).isEqualTo("My short description."); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java index 7bd068c1776..58e0eb5a61e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java @@ -73,9 +73,9 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor static final String DEPRECATED_CONFIGURATION_PROPERTY_ANNOTATION = "org.springframework.boot." + "context.properties.DeprecatedConfigurationProperty"; - static final String DEFAULT_VALUE_ANNOTATION = "org.springframework.boot." + "context.properties.bind.DefaultValue"; + static final String DEFAULT_VALUE_ANNOTATION = "org.springframework.boot.context.properties.bind.DefaultValue"; - static final String ENDPOINT_ANNOTATION = "org.springframework.boot.actuate." + "endpoint.annotation.Endpoint"; + static final String ENDPOINT_ANNOTATION = "org.springframework.boot.actuate.endpoint.annotation.Endpoint"; static final String READ_OPERATION_ANNOTATION = "org.springframework.boot.actuate." + "endpoint.annotation.ReadOperation"; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemDeprecation.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemDeprecation.java index 40032022f9e..2947e94f155 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemDeprecation.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemDeprecation.java @@ -91,8 +91,8 @@ public class ItemDeprecation { @Override public String toString() { - return "ItemDeprecation{" + "reason='" + this.reason + '\'' + ", " + "replacement='" + this.replacement + '\'' - + ", " + "level='" + this.level + '\'' + '}'; + return "ItemDeprecation{reason='" + this.reason + '\'' + ", replacement='" + this.replacement + '\'' + + ", level='" + this.level + '\'' + '}'; } private boolean nullSafeEquals(Object o1, Object o2) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemHint.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemHint.java index f7dbf662ff9..1b07489c136 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemHint.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemHint.java @@ -81,7 +81,7 @@ public class ItemHint implements Comparable { @Override public String toString() { - return "ItemHint{" + "name='" + this.name + "', values=" + this.values + ", providers=" + this.providers + '}'; + return "ItemHint{name='" + this.name + "', values=" + this.values + ", providers=" + this.providers + '}'; } /** @@ -108,7 +108,7 @@ public class ItemHint implements Comparable { @Override public String toString() { - return "ValueHint{" + "value=" + this.value + ", description='" + this.description + '\'' + '}'; + return "ValueHint{value=" + this.value + ", description='" + this.description + '\'' + '}'; } } @@ -137,7 +137,7 @@ public class ItemHint implements Comparable { @Override public String toString() { - return "ValueProvider{" + "name='" + this.name + "', parameters=" + this.parameters + '}'; + return "ValueProvider{name='" + this.name + "', parameters=" + this.parameters + '}'; } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java index c7b8ba00844..4d226179f24 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java @@ -55,8 +55,8 @@ final class ApplicationPluginAction implements PluginApplicationAction { } CreateBootStartScripts bootStartScripts = project.getTasks().create("bootStartScripts", CreateBootStartScripts.class); - bootStartScripts.setDescription( - "Generates OS-specific start scripts to run the" + " project as a Spring Boot application."); + bootStartScripts + .setDescription("Generates OS-specific start scripts to run the project as a Spring Boot application."); ((TemplateBasedScriptGenerator) bootStartScripts.getUnixStartScriptGenerator()) .setTemplate(project.getResources().getText().fromString(loadResource("/unixStartScript.txt"))); ((TemplateBasedScriptGenerator) bootStartScripts.getWindowsStartScriptGenerator()) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java index 91800b1b16e..15280ae155b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java @@ -83,7 +83,7 @@ final class JavaPluginAction implements PluginApplicationAction { private BootJar configureBootJarTask(Project project) { BootJar bootJar = project.getTasks().create(SpringBootPlugin.BOOT_JAR_TASK_NAME, BootJar.class); bootJar.setDescription( - "Assembles an executable jar archive containing the main" + " classes and their dependencies."); + "Assembles an executable jar archive containing the main classes and their dependencies."); bootJar.setGroup(BasePlugin.BUILD_GROUP); bootJar.classpath((Callable) () -> { JavaPluginConvention convention = project.getConvention().getPlugin(JavaPluginConvention.class); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java index 39f1e9da8b5..10433d672cc 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java @@ -86,7 +86,7 @@ public class SpringBootPlugin implements Plugin { private void verifyGradleVersion() { if (GradleVersion.current().compareTo(GradleVersion.version("4.10")) < 0) { - throw new GradleException("Spring Boot plugin requires Gradle 4.10 or later." + " The current version is " + throw new GradleException("Spring Boot plugin requires Gradle 4.10 or later. The current version is " + GradleVersion.current()); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java index 712e2a24140..8da6fdbef5a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java @@ -54,7 +54,7 @@ class UnresolvedDependenciesAnalyzer { + "declared without a version failed to resolve:\n"); this.dependenciesWithNoVersion .forEach((dependency) -> message.append(" ").append(dependency).append("\n")); - message.append("\nDid you forget to apply the " + "io.spring.dependency-management plugin to the "); + message.append("\nDid you forget to apply the io.spring.dependency-management plugin to the "); message.append(project.getName()).append(" project?\n"); logger.warn(message.toString()); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/DependencyManagementPluginActionIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/DependencyManagementPluginActionIntegrationTests.java index d374500f668..d8533c6459f 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/DependencyManagementPluginActionIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/DependencyManagementPluginActionIntegrationTests.java @@ -64,7 +64,7 @@ public class DependencyManagementPluginActionIntegrationTests { assertThat(output).contains("During the build, one or more dependencies that " + "were declared without a version failed to resolve:"); assertThat(output).contains("org.springframework.boot:spring-boot-starter-web:"); - assertThat(output).contains("Did you forget to apply the " + "io.spring.dependency-management plugin to the " + assertThat(output).contains("Did you forget to apply the io.spring.dependency-management plugin to the " + this.gradleBuild.getProjectDir().getName() + " project?"); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java index 28f2da4030f..f531c774739 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java @@ -42,7 +42,7 @@ class SpringBootPluginIntegrationTests { void failFastWithVersionOfGradleLowerThanRequired() { BuildResult result = this.gradleBuild.gradleVersion("4.9").buildAndFail(); assertThat(result.getOutput()) - .contains("Spring Boot plugin requires Gradle 4.10" + " or later. The current version is Gradle 4.9"); + .contains("Spring Boot plugin requires Gradle 4.10 or later. The current version is Gradle 4.9"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java index b7631d178ef..ccf8426af65 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java @@ -86,7 +86,7 @@ public class Repackager { } if (!source.exists() || !source.isFile()) { throw new IllegalArgumentException( - "Source must refer to an existing file, " + "got " + source.getAbsolutePath()); + "Source must refer to an existing file, got " + source.getAbsolutePath()); } this.source = source.getAbsoluteFile(); this.layoutFactory = layoutFactory; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java index 2439829776a..3aadff9eeb4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/MainClassFinderTests.java @@ -87,7 +87,7 @@ class MainClassFinderTests { try (JarFile jarFile = this.testJarFile.getJarFile()) { assertThatIllegalStateException().isThrownBy(() -> MainClassFinder.findSingleMainClass(jarFile, "")) .withMessageContaining( - "Unable to find a single main class " + "from the following candidates [a.B, a.b.c.E]"); + "Unable to find a single main class from the following candidates [a.B, a.b.c.E]"); } } @@ -145,7 +145,7 @@ class MainClassFinderTests { assertThatIllegalStateException() .isThrownBy(() -> MainClassFinder.findSingleMainClass(this.testJarFile.getJarSource())) .withMessageContaining( - "Unable to find a single main class " + "from the following candidates [a.B, a.b.c.E]"); + "Unable to find a single main class from the following candidates [a.B, a.b.c.E]"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java index 78701b6b0c7..4c10b770082 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java @@ -168,7 +168,7 @@ class RepackagerTests { File file = this.testJarFile.getFile(); Repackager repackager = new Repackager(file); assertThatIllegalStateException().isThrownBy(() -> repackager.repackage(NO_LIBRARIES)).withMessageContaining( - "Unable to find a single main class " + "from the following candidates [a.b.C, a.b.D]"); + "Unable to find a single main class from the following candidates [a.b.C, a.b.D]"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java index 58dc1403eb0..9a6ca13269b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java @@ -86,8 +86,7 @@ public class LaunchedURLClassLoader extends URLClassLoader { // This should never happen as the IllegalArgumentException indicates // that the package has already been defined and, therefore, // getPackage(name) should not return null. - throw new AssertionError( - "Package " + name + " has already been " + "defined but it could not be found"); + throw new AssertionError("Package " + name + " has already been defined but it could not be found"); } } return super.loadClass(name, resolve); @@ -118,7 +117,7 @@ public class LaunchedURLClassLoader extends URLClassLoader { // indicates that the package has already been defined and, // therefore, getPackage(name) should not have returned null. throw new AssertionError( - "Package " + packageName + " has already been defined " + "but it could not be found"); + "Package " + packageName + " has already been defined but it could not be found"); } } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.java index db3cc73010c..d3c689841c4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.java @@ -63,7 +63,7 @@ class CentralDirectoryEndRecord { if (this.size > this.block.length) { if (this.size >= MAXIMUM_SIZE || this.size > data.getSize()) { throw new IOException( - "Unable to find ZIP central directory " + "records after reading " + this.size + " bytes"); + "Unable to find ZIP central directory records after reading " + this.size + " bytes"); } this.block = createBlockFromEndOfData(data, this.size + READ_BLOCK_SIZE); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index 40ffe0756c6..013e4accc53 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -424,8 +424,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { } } if (mainClass == null) { - throw new MojoExecutionException( - "Unable to find a suitable main class, " + "please add a 'mainClass' property"); + throw new MojoExecutionException("Unable to find a suitable main class, please add a 'mainClass' property"); } return mainClass; } @@ -557,7 +556,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { } catch (NoSuchMethodException ex) { Exception wrappedEx = new Exception( - "The specified mainClass doesn't contain a " + "main method with appropriate signature.", ex); + "The specified mainClass doesn't contain a main method with appropriate signature.", ex); thread.getThreadGroup().uncaughtException(thread, wrappedEx); } catch (Exception ex) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index 6aec4faecfb..3ce4eff58f2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -360,7 +360,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { @Override public void handleTimeoutWarning(long duration, String mainMethod) { getLog().warn("Searching for the main-class is taking some time, " - + "consider using the mainClass configuration " + "parameter"); + + "consider using the mainClass configuration parameter"); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java index d39d80d0960..240d9d41a7c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java @@ -254,7 +254,7 @@ public class StartMojo extends AbstractRunMojo { } } throw new MojoExecutionException( - "Spring application did not start before the configured " + "timeout (" + (wait * maxAttempts) + "ms"); + "Spring application did not start before the configured timeout (" + (wait * maxAttempts) + "ms"); } private class CreateJmxConnector implements Callable { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/RunArgumentsTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/RunArgumentsTests.java index 87a92131511..e75e29d6266 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/RunArgumentsTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/RunArgumentsTests.java @@ -80,7 +80,7 @@ class RunArgumentsTests { @Test void parseWithNewLinesAndTabs() { - String[] args = parseArgs(" -Dfoo=bar \n" + "\t\t -Dfoo2=bar2 "); + String[] args = parseArgs(" -Dfoo=bar \n\t\t -Dfoo2=bar2 "); assertThat(args.length).isEqualTo(2); assertThat(args[0]).isEqualTo("-Dfoo=bar"); assertThat(args[1]).isEqualTo("-Dfoo2=bar2"); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/Verify.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/Verify.java index ef1ad6ddb84..c69a060bb43 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/Verify.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/Verify.java @@ -249,9 +249,9 @@ public final class Verify { verifier.assertHasEntryNameStartingWith("WEB-INF/lib/spring-context"); verifier.assertHasEntryNameStartingWith("WEB-INF/lib/spring-core"); verifier.assertHasEntryNameStartingWith("WEB-INF/lib-provided/jakarta.servlet-api-4"); - assertThat(verifier.hasEntry("org/" + "springframework/boot/loader/JarLauncher.class")) + assertThat(verifier.hasEntry("org/springframework/boot/loader/JarLauncher.class")) .as("Unpacked launcher classes").isTrue(); - assertThat(verifier.hasEntry("WEB-INF/classes/org/" + "test/SampleApplication.class")).as("Own classes") + assertThat(verifier.hasEntry("WEB-INF/classes/org/test/SampleApplication.class")).as("Own classes") .isTrue(); assertThat(verifier.hasEntry("index.html")).as("Web content").isTrue(); } @@ -294,9 +294,9 @@ public final class Verify { verifier.assertHasEntryNameStartingWith("lib/spring-context"); verifier.assertHasEntryNameStartingWith("lib/spring-core"); verifier.assertHasNoEntryNameStartingWith("lib/jakarta.servlet-api"); - assertThat(verifier.hasEntry("org/" + "springframework/boot/loader/JarLauncher.class")) + assertThat(verifier.hasEntry("org/springframework/boot/loader/JarLauncher.class")) .as("Unpacked launcher classes").isFalse(); - assertThat(verifier.hasEntry("org/" + "test/SampleModule.class")).as("Own classes").isTrue(); + assertThat(verifier.hasEntry("org/test/SampleModule.class")).as("Own classes").isTrue(); } @Override diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunnerExclusionsTests.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunnerExclusionsTests.java index a96e4cfb268..dd20b1c9e30 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunnerExclusionsTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathRunnerExclusionsTests.java @@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.isA; @ClassPathExclusions("hibernate-validator-*.jar") public class ModifiedClassPathRunnerExclusionsTests { - private static final String EXCLUDED_RESOURCE = "META-INF/services/" + "javax.validation.spi.ValidationProvider"; + private static final String EXCLUDED_RESOURCE = "META-INF/services/javax.validation.spi.ValidationProvider"; @Test public void entriesAreFilteredFromTestClassClassLoader() { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index 0614230991a..6887d07fefd 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -581,8 +581,7 @@ public class SpringApplication { } catch (ClassNotFoundException ex) { throw new IllegalStateException( - "Unable create a default ApplicationContext, " + "please specify an ApplicationContextClass", - ex); + "Unable create a default ApplicationContext, please specify an ApplicationContextClass", ex); } } return (ConfigurableApplicationContext) BeanUtils.instantiateClass(contextClass); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/WebApplicationType.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/WebApplicationType.java index 8fd8fd175ac..ad13427c91f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/WebApplicationType.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/WebApplicationType.java @@ -48,9 +48,9 @@ public enum WebApplicationType { private static final String[] SERVLET_INDICATOR_CLASSES = { "javax.servlet.Servlet", "org.springframework.web.context.ConfigurableWebApplicationContext" }; - private static final String WEBMVC_INDICATOR_CLASS = "org.springframework." + "web.servlet.DispatcherServlet"; + private static final String WEBMVC_INDICATOR_CLASS = "org.springframework.web.servlet.DispatcherServlet"; - private static final String WEBFLUX_INDICATOR_CLASS = "org." + "springframework.web.reactive.DispatcherHandler"; + private static final String WEBFLUX_INDICATOR_CLASS = "org.springframework.web.reactive.DispatcherHandler"; private static final String JERSEY_INDICATOR_CLASS = "org.glassfish.jersey.servlet.ServletContainer"; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java index eae415310c4..f9999ad4d67 100755 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java @@ -143,7 +143,7 @@ public class ConfigurationWarningsApplicationContextInitializer if (problematicPackages.isEmpty()) { return null; } - return "Your ApplicationContext is unlikely to " + "start due to a @ComponentScan of " + return "Your ApplicationContext is unlikely to start due to a @ComponentScan of " + StringUtils.collectionToDelimitedString(problematicPackages, ", ") + "."; } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java index 0a702a0a376..f17e20f257a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java @@ -539,8 +539,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor, } } catch (Exception ex) { - throw new IllegalStateException("Failed to load property " + "source from location '" + location + "'", - ex); + throw new IllegalStateException("Failed to load property source from location '" + location + "'", ex); } } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/DelegatingApplicationContextInitializer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/DelegatingApplicationContextInitializer.java index 9aff4e447dd..8191f98d4fe 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/DelegatingApplicationContextInitializer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/DelegatingApplicationContextInitializer.java @@ -93,8 +93,8 @@ public class DelegatingApplicationContextInitializer ApplicationContextInitializer.class); Assert.isAssignable(requireContextClass, contextClass, String.format( - "Could not add context initializer [%s]" + " as its generic parameter [%s] is not assignable " - + "from the type of application context used by this " + "context loader [%s]: ", + "Could not add context initializer [%s] as its generic parameter [%s] is not assignable " + + "from the type of application context used by this context loader [%s]: ", initializerClass.getName(), requireContextClass.getName(), contextClass.getName())); return (ApplicationContextInitializer) BeanUtils.instantiateClass(initializerClass); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java index a786b56aea4..f69202c8331 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java @@ -296,8 +296,7 @@ public class LoggingApplicationListener implements GenericApplicationListener { } catch (Exception ex) { // NOTE: We can't use the logger here to report the problem - System.err.println( - "Logging system failed to initialize " + "using configuration from '" + logConfig + "'"); + System.err.println("Logging system failed to initialize using configuration from '" + logConfig + "'"); ex.printStackTrace(System.err); throw new IllegalStateException(ex); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertySourcesDeducer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertySourcesDeducer.java index c93b662ee58..793ad51eb29 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertySourcesDeducer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertySourcesDeducer.java @@ -53,7 +53,7 @@ class PropertySourcesDeducer { return sources; } throw new IllegalStateException( - "Unable to obtain PropertySources from " + "PropertySourcesPlaceholderConfigurer or Environment"); + "Unable to obtain PropertySources from PropertySourcesPlaceholderConfigurer or Environment"); } private MutablePropertySources extractEnvironmentPropertySources() { @@ -72,7 +72,7 @@ class PropertySourcesDeducer { return beans.values().iterator().next(); } if (beans.size() > 1 && logger.isWarnEnabled()) { - logger.warn("Multiple PropertySourcesPlaceholderConfigurer " + "beans registered " + beans.keySet() + logger.warn("Multiple PropertySourcesPlaceholderConfigurer beans registered " + beans.keySet() + ", falling back to Environment"); } return null; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java index 63743e05cc8..4e028fbbb01 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java @@ -67,8 +67,8 @@ class BeanCurrentlyInCreationFailureAnalyzer extends AbstractFailureAnalyzer beansInCycle = dependencyCycle.getBeansInCycle(); int cycleStart = dependencyCycle.getCycleStart(); for (int i = 0; i < beansInCycle.size(); i++) { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanNotOfRequiredTypeFailureAnalyzer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanNotOfRequiredTypeFailureAnalyzer.java index 5829db68db9..d48f1e5ecfa 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanNotOfRequiredTypeFailureAnalyzer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanNotOfRequiredTypeFailureAnalyzer.java @@ -35,7 +35,7 @@ public class BeanNotOfRequiredTypeFailureAnalyzer extends AbstractFailureAnalyze private static final String ACTION = "Consider injecting the bean as one of its " + "interfaces or forcing the use of CGLib-based " - + "proxies by setting proxyTargetClass=true on @EnableAsync and/or " + "@EnableCaching."; + + "proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching."; @Override protected FailureAnalysis analyze(Throwable rootFailure, BeanNotOfRequiredTypeException cause) { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/ConnectorStartFailureAnalyzer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/ConnectorStartFailureAnalyzer.java index 23d71fe54b3..15a19e3ba28 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/ConnectorStartFailureAnalyzer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/ConnectorStartFailureAnalyzer.java @@ -29,9 +29,10 @@ class ConnectorStartFailureAnalyzer extends AbstractFailureAnalyzer others = descriptors.subList(1, descriptors.size()); if (!others.isEmpty()) { message.append( - String.format("%n%nAdditionally, this property is also set in the following " + "property %s:%n%n", + String.format("%n%nAdditionally, this property is also set in the following property %s:%n%n", (others.size() > 1) ? "sources" : "source")); for (Descriptor other : others) { message.append("\t- In '").append(other.getPropertySource()).append("'"); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzer.java index 739ffb5b344..a9c29d42eb0 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzer.java @@ -50,7 +50,7 @@ class NoSuchMethodFailureAnalyzer extends AbstractFailureAnalyzer fallbacks = new LinkedHashSet<>(); - fallbacks.add("org.hibernate.validator.messageinterpolation" + ".ParameterMessageInterpolator"); + fallbacks.add("org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator"); FALLBACKS = Collections.unmodifiableSet(fallbacks); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/SslServerCustomizer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/SslServerCustomizer.java index 24b789ff5b4..02c0c626cb0 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/SslServerCustomizer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/SslServerCustomizer.java @@ -93,7 +93,7 @@ class SslServerCustomizer implements JettyServerCustomizer { return createHttp11ServerConnector(server, config, sslContextFactory); } Assert.state(isAlpnPresent(), - () -> "The 'org.eclipse.jetty:jetty-alpn-server' " + "dependency is required for HTTP/2 support."); + () -> "The 'org.eclipse.jetty:jetty-alpn-server' dependency is required for HTTP/2 support."); Assert.state(isConscryptPresent(), () -> "The 'org.eclipse.jetty.http2:http2-server' and Conscrypt " + "dependencies are required for HTTP/2 support."); return createHttp2ServerConnector(server, config, sslContextFactory); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizer.java index ee4a379fe85..feca8afedf4 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizer.java @@ -53,7 +53,7 @@ class SslConnectorCustomizer implements TomcatConnectorCustomizer { public void customize(Connector connector) { ProtocolHandler handler = connector.getProtocolHandler(); Assert.state(handler instanceof AbstractHttp11JsseProtocol, - "To use SSL, the connector's protocol handler must be an " + "AbstractHttp11JsseProtocol subclass"); + "To use SSL, the connector's protocol handler must be an AbstractHttp11JsseProtocol subclass"); configureSsl((AbstractHttp11JsseProtocol) handler, this.ssl, this.sslStoreProvider); connector.setScheme("https"); connector.setSecure(true); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java index a67ec055413..7419a764741 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java @@ -129,8 +129,7 @@ public class TomcatEmbeddedWebappClassLoader extends ParallelWebappClassLoader { this.securityManager.checkPackageAccess(name.substring(0, name.lastIndexOf('.'))); } catch (SecurityException ex) { - throw new ClassNotFoundException("Security Violation, attempt to use " + "Restricted Class: " + name, - ex); + throw new ClassNotFoundException("Security Violation, attempt to use Restricted Class: " + name, ex); } } } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java index d245caa09ed..9e6611e10a6 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java @@ -98,7 +98,7 @@ public class ReactiveWebServerApplicationContext extends GenericReactiveWebAppli String[] beanNames = getBeanFactory().getBeanNamesForType(ReactiveWebServerFactory.class); if (beanNames.length == 0) { throw new ApplicationContextException( - "Unable to start ReactiveWebApplicationContext due to missing " + "ReactiveWebServerFactory bean."); + "Unable to start ReactiveWebApplicationContext due to missing ReactiveWebServerFactory bean."); } if (beanNames.length > 1) { throw new ApplicationContextException("Unable to start ReactiveWebApplicationContext due to multiple " diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPageRegistrarBeanPostProcessor.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPageRegistrarBeanPostProcessor.java index bbe72b12bdb..0e25bf2ccaf 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPageRegistrarBeanPostProcessor.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPageRegistrarBeanPostProcessor.java @@ -46,7 +46,7 @@ public class ErrorPageRegistrarBeanPostProcessor implements BeanPostProcessor, B @Override public void setBeanFactory(BeanFactory beanFactory) { Assert.isInstanceOf(ListableBeanFactory.class, beanFactory, - "ErrorPageRegistrarBeanPostProcessor can only be used " + "with a ListableBeanFactory"); + "ErrorPageRegistrarBeanPostProcessor can only be used with a ListableBeanFactory"); this.beanFactory = (ListableBeanFactory) beanFactory; } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java index e2485300e61..61c1deb25ea 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java @@ -48,7 +48,7 @@ public class WebServerFactoryCustomizerBeanPostProcessor implements BeanPostProc @Override public void setBeanFactory(BeanFactory beanFactory) { Assert.isInstanceOf(ListableBeanFactory.class, beanFactory, - "WebServerCustomizerBeanPostProcessor can only be used " + "with a ListableBeanFactory"); + "WebServerCustomizerBeanPostProcessor can only be used with a ListableBeanFactory"); this.beanFactory = (ListableBeanFactory) beanFactory; } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java index 944812e8beb..b5377eb7a09 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java @@ -107,8 +107,7 @@ public abstract class DynamicRegistrationBean ex protected final void register(String description, ServletContext servletContext) { D registration = addRegistration(description, servletContext); if (registration == null) { - logger.info( - StringUtils.capitalize(description) + " was not registered " + "(possibly already registered?)"); + logger.info(StringUtils.capitalize(description) + " was not registered (possibly already registered?)"); return; } configure(registration); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializer.java index f43301345fe..fb1fe082b28 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializer.java @@ -99,7 +99,7 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit }); } else { - this.logger.debug("No ContextLoaderListener registered, as " + "createRootApplicationContext() did not " + this.logger.debug("No ContextLoaderListener registered, as createRootApplicationContext() did not " + "return an application context"); } } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/cloud/cloudfoundry/CloudFoundryVcapEnvironmentPostProcessorTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/cloud/cloudfoundry/CloudFoundryVcapEnvironmentPostProcessorTests.java index f254fa450cb..08658658a80 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/cloud/cloudfoundry/CloudFoundryVcapEnvironmentPostProcessorTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/cloud/cloudfoundry/CloudFoundryVcapEnvironmentPostProcessorTests.java @@ -40,15 +40,15 @@ class CloudFoundryVcapEnvironmentPostProcessorTests { @Test void testApplicationProperties() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context, - "VCAP_APPLICATION={\"application_users\":[]," + "\"instance_id\":\"bb7935245adf3e650dfb7c58a06e9ece\"," + "VCAP_APPLICATION={\"application_users\":[],\"instance_id\":\"bb7935245adf3e650dfb7c58a06e9ece\"," + "\"instance_index\":0,\"version\":\"3464e092-1c13-462e-a47c-807c30318a50\"," + "\"name\":\"foo\",\"uris\":[\"foo.cfapps.io\"]," - + "\"started_at\":\"2013-05-29 02:37:59 +0000\"," + "\"started_at_timestamp\":1369795079," + + "\"started_at\":\"2013-05-29 02:37:59 +0000\",\"started_at_timestamp\":1369795079," + "\"host\":\"0.0.0.0\",\"port\":61034," + "\"limits\":{\"mem\":128,\"disk\":1024,\"fds\":16384}," + "\"version\":\"3464e092-1c13-462e-a47c-807c30318a50\"," + "\"name\":\"dsyerenv\",\"uris\":[\"dsyerenv.cfapps.io\"]," - + "\"users\":[],\"start\":\"2013-05-29 02:37:59 +0000\"," + "\"state_timestamp\":1369795079}"); + + "\"users\":[],\"start\":\"2013-05-29 02:37:59 +0000\",\"state_timestamp\":1369795079}"); this.initializer.postProcessEnvironment(this.context.getEnvironment(), null); assertThat(this.context.getEnvironment().getProperty("vcap.application.instance_id")) .isEqualTo("bb7935245adf3e650dfb7c58a06e9ece"); @@ -76,12 +76,12 @@ class CloudFoundryVcapEnvironmentPostProcessorTests { + "\"instance_id\":\"bb7935245adf3e650dfb7c58a06e9ece\"," + "\"instance_index\":0,\"version\":\"3464e092-1c13-462e-a47c-807c30318a50\"," + "\"name\":\"foo\",\"uris\":[\"foo.cfapps.io\"]," - + "\"started_at\":\"2013-05-29 02:37:59 +0000\"," + "\"started_at_timestamp\":1369795079," + + "\"started_at\":\"2013-05-29 02:37:59 +0000\",\"started_at_timestamp\":1369795079," + "\"host\":\"0.0.0.0\",\"port\":61034," + "\"limits\":{\"mem\":128,\"disk\":1024,\"fds\":16384}," + "\"version\":\"3464e092-1c13-462e-a47c-807c30318a50\"," + "\"name\":\"dsyerenv\",\"uris\":[\"dsyerenv.cfapps.io\"]," - + "\"users\":[],\"start\":\"2013-05-29 02:37:59 +0000\"," + "\"state_timestamp\":1369795079}"); + + "\"users\":[],\"start\":\"2013-05-29 02:37:59 +0000\",\"state_timestamp\":1369795079}"); this.initializer.postProcessEnvironment(this.context.getEnvironment(), null); assertThat(getProperty("vcap")).isNull(); } @@ -89,8 +89,8 @@ class CloudFoundryVcapEnvironmentPostProcessorTests { @Test void testServiceProperties() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context, - "VCAP_SERVICES={\"rds-mysql-n/a\":[{" + "\"name\":\"mysql\",\"label\":\"rds-mysql-n/a\"," - + "\"plan\":\"10mb\",\"credentials\":{" + "\"name\":\"d04fb13d27d964c62b267bbba1cffb9da\"," + "VCAP_SERVICES={\"rds-mysql-n/a\":[{\"name\":\"mysql\",\"label\":\"rds-mysql-n/a\"," + + "\"plan\":\"10mb\",\"credentials\":{\"name\":\"d04fb13d27d964c62b267bbba1cffb9da\"," + "\"hostname\":\"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com\"," + "\"ssl\":true,\"location\":null," + "\"host\":\"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com\"," @@ -106,11 +106,11 @@ class CloudFoundryVcapEnvironmentPostProcessorTests { @Test void testServicePropertiesWithoutNA() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context, - "VCAP_SERVICES={\"rds-mysql\":[{" + "\"name\":\"mysql\",\"label\":\"rds-mysql\",\"plan\":\"10mb\"," + "VCAP_SERVICES={\"rds-mysql\":[{\"name\":\"mysql\",\"label\":\"rds-mysql\",\"plan\":\"10mb\"," + "\"credentials\":{\"name\":\"d04fb13d27d964c62b267bbba1cffb9da\"," + "\"hostname\":\"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com\"," + "\"host\":\"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com\"," - + "\"port\":3306,\"user\":\"urpRuqTf8Cpe6\"," + "\"username\":\"urpRuqTf8Cpe6\"," + + "\"port\":3306,\"user\":\"urpRuqTf8Cpe6\",\"username\":\"urpRuqTf8Cpe6\"," + "\"password\":\"pxLsGVpsC9A5S\"}}]}"); this.initializer.postProcessEnvironment(this.context.getEnvironment(), null); assertThat(getProperty("vcap.services.mysql.name")).isEqualTo("mysql"); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java index 753bf91fd74..a4a261fd974 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java @@ -142,7 +142,7 @@ class ConfigFileApplicationListenerTests { @Test void loadTwoPropertiesFile() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment, - "spring.config.location=" + "classpath:application.properties,classpath:testproperties.properties"); + "spring.config.location=classpath:application.properties,classpath:testproperties.properties"); this.initializer.postProcessEnvironment(this.environment, this.application); String property = this.environment.getProperty("the.property"); assertThat(property).isEqualTo("frompropertiesfile"); @@ -151,7 +151,7 @@ class ConfigFileApplicationListenerTests { @Test void loadTwoPropertiesFilesWithProfiles() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment, - "spring.config.location=classpath:enableprofile.properties," + "classpath:enableother.properties"); + "spring.config.location=classpath:enableprofile.properties,classpath:enableother.properties"); this.initializer.postProcessEnvironment(this.environment, this.application); assertThat(this.environment.getActiveProfiles()).containsExactly("other"); String property = this.environment.getProperty("my.property"); @@ -224,7 +224,7 @@ class ConfigFileApplicationListenerTests { @Test void loadTwoOfThreePropertiesFile() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment, - "spring.config.location=classpath:application.properties," + "classpath:testproperties.properties," + "spring.config.location=classpath:application.properties,classpath:testproperties.properties," + "classpath:nonexistent.properties"); this.initializer.postProcessEnvironment(this.environment, this.application); String property = this.environment.getProperty("the.property"); @@ -645,10 +645,10 @@ class ConfigFileApplicationListenerTests { String property = this.environment.getProperty("the.property"); assertThat(property).isEqualTo("fromspecificlocation"); assertThat(this.environment) - .has(matchingPropertySource("applicationConfig: " + "[classpath:specificlocation.properties]")); + .has(matchingPropertySource("applicationConfig: [classpath:specificlocation.properties]")); // The default property source is not there assertThat(this.environment) - .doesNotHave(matchingPropertySource("applicationConfig: " + "[classpath:/application.properties]")); + .doesNotHave(matchingPropertySource("applicationConfig: [classpath:/application.properties]")); assertThat(this.environment.getProperty("foo")).isNull(); } @@ -661,10 +661,10 @@ class ConfigFileApplicationListenerTests { String property = this.environment.getProperty("the.property"); assertThat(property).isEqualTo("fromspecificlocation"); assertThat(this.environment) - .has(matchingPropertySource("applicationConfig: " + "[classpath:specificlocation.properties]")); + .has(matchingPropertySource("applicationConfig: [classpath:specificlocation.properties]")); // The default property source is still there assertThat(this.environment) - .has(matchingPropertySource("applicationConfig: " + "[classpath:/application.properties]")); + .has(matchingPropertySource("applicationConfig: [classpath:/application.properties]")); assertThat(this.environment.getProperty("foo")).isEqualTo("bucket"); } @@ -707,7 +707,7 @@ class ConfigFileApplicationListenerTests { property = context.getEnvironment().getProperty("my.property"); assertThat(property).isEqualTo("fromapplicationproperties"); assertThat(context.getEnvironment()) - .has(matchingPropertySource("class path resource " + "[specificlocation.properties]")); + .has(matchingPropertySource("class path resource [specificlocation.properties]")); context.close(); } @@ -721,7 +721,7 @@ class ConfigFileApplicationListenerTests { String property = context.getEnvironment().getProperty("the.property"); assertThat(property).isEqualTo("fromspecificlocation"); assertThat(context.getEnvironment()) - .has(matchingPropertySource("class path resource " + "[specificlocation.properties]")); + .has(matchingPropertySource("class path resource [specificlocation.properties]")); context.close(); } @@ -744,9 +744,9 @@ class ConfigFileApplicationListenerTests { String property = context.getEnvironment().getProperty("the.property"); assertThat(property).isEqualTo("frompropertiesfile"); assertThat(context.getEnvironment()) - .has(matchingPropertySource("class path resource " + "[enableprofile.properties]")); + .has(matchingPropertySource("class path resource [enableprofile.properties]")); assertThat(context.getEnvironment()) - .doesNotHave(matchingPropertySource("classpath:/" + "enableprofile-myprofile.properties")); + .doesNotHave(matchingPropertySource("classpath:/enableprofile-myprofile.properties")); context.close(); } @@ -758,7 +758,7 @@ class ConfigFileApplicationListenerTests { String property = context.getEnvironment().getProperty("my.property"); assertThat(property).isEqualTo("fromapplicationproperties"); assertThat(context.getEnvironment()) - .doesNotHave(matchingPropertySource("classpath:" + "/enableprofile-myprofile.properties")); + .doesNotHave(matchingPropertySource("classpath:/enableprofile-myprofile.properties")); context.close(); } @@ -770,7 +770,7 @@ class ConfigFileApplicationListenerTests { String property = context.getEnvironment().getProperty("the.property"); assertThat(property).isEqualTo("frommorepropertiesfile"); assertThat(context.getEnvironment()) - .has(matchingPropertySource("class path resource " + "[specificlocation.properties]")); + .has(matchingPropertySource("class path resource [specificlocation.properties]")); context.close(); } @@ -906,7 +906,7 @@ class ConfigFileApplicationListenerTests { @Test void lastAdditionalLocationWins() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment, - "spring.config.additional-location=classpath:override.properties," + "classpath:some.properties"); + "spring.config.additional-location=classpath:override.properties,classpath:some.properties"); this.initializer.postProcessEnvironment(this.environment, this.application); assertThat(this.environment.getProperty("foo")).isEqualTo("spam"); assertThat(this.environment.getProperty("value")).isEqualTo("1234"); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java index 59fdcc816b5..77379ae8da1 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java @@ -145,8 +145,8 @@ class BindableTests { Bindable bindable = Bindable.of(String.class).withExistingValue("foo").withAnnotations(annotation); System.out.println(bindable.toString()); assertThat(bindable.toString()) - .contains("type = java.lang.String, " + "value = 'provided', annotations = array[" - + "@org.springframework.boot.context.properties.bind." + "BindableTests$TestAnnotation()]"); + .contains("type = java.lang.String, value = 'provided', annotations = array[" + + "@org.springframework.boot.context.properties.bind.BindableTests$TestAnnotation()]"); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java index 953f9192746..541b5c9a53a 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java @@ -94,9 +94,9 @@ class BeanCurrentlyInCreationFailureAnalyzerTests { assertThat(lines.get(0)) .isEqualTo("The dependencies of some of the beans in the application context form a cycle:"); assertThat(lines.get(1)).isEqualTo(""); - assertThat(lines.get(2)).contains("refererOne " + "(field " + RefererTwo.class.getName()); + assertThat(lines.get(2)).contains("refererOne (field " + RefererTwo.class.getName()); assertThat(lines.get(3)).isEqualTo(" ↓"); - assertThat(lines.get(4)).contains("refererTwo " + "(field " + BeanOne.class.getName()); + assertThat(lines.get(4)).contains("refererTwo (field " + BeanOne.class.getName()); assertThat(lines.get(5)).isEqualTo("┌─────┐"); assertThat(lines.get(6)) .startsWith("| one defined in " + CycleReferencedViaOtherBeansConfiguration.class.getName()); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzerTests.java index 29b46485355..45d47f6e5ab 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzerTests.java @@ -87,7 +87,7 @@ class InvalidConfigurationPropertyValueFailureAnalyzerTests { assertCommonParts(failure, analysis); assertThat(analysis.getAction()).contains("Review the value of the property with the provided reason."); assertThat(analysis.getDescription()) - .contains("Additionally, this property is also set in the following " + "property sources:") + .contains("Additionally, this property is also set in the following property sources:") .contains("In 'additional' with the value 'valid'") .contains("In 'another' with the value 'test' (originating from 'TestOrigin test.property')"); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java index 2e80d8953d0..70ffff5812f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java @@ -46,7 +46,7 @@ public class NoSuchMethodFailureAnalyzerTests { assertThat(analysis).isNotNull(); assertThat(analysis.getDescription()) .contains(NoSuchMethodFailureAnalyzerTests.class.getName() + ".createFailure(") - .contains("javax.servlet.ServletContext.addServlet" + "(Ljava/lang/String;Ljavax/servlet/Servlet;)" + .contains("javax.servlet.ServletContext.addServlet(Ljava/lang/String;Ljavax/servlet/Servlet;)" + "Ljavax/servlet/ServletRegistration$Dynamic;") .contains("class, javax.servlet.ServletContext,"); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java index d1350e29739..797170acb6e 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java @@ -377,8 +377,7 @@ class LambdaSafeTests { String argument = "foo"; LambdaSafe.callback(GenericCallback.class, callbackInstance, argument).withLogger(logger) .invoke((c) -> c.handle(argument)); - verify(logger).debug( - contains("Non-matching CharSequence type for callback " + "LambdaSafeTests.GenericCallback"), + verify(logger).debug(contains("Non-matching CharSequence type for callback LambdaSafeTests.GenericCallback"), any(Throwable.class)); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/SslBuilderCustomizerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/SslBuilderCustomizerTests.java index a7ae5fa564e..5b876bc6b8f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/SslBuilderCustomizerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/SslBuilderCustomizerTests.java @@ -46,7 +46,7 @@ class SslBuilderCustomizerTests { SslBuilderCustomizer customizer = new SslBuilderCustomizer(8080, InetAddress.getLocalHost(), ssl, null); KeyManager[] keyManagers = ReflectionTestUtils.invokeMethod(customizer, "getKeyManagers", ssl, null); Class name = Class.forName( - "org.springframework.boot.web.embedded.undertow" + ".SslBuilderCustomizer$ConfigurableAliasKeyManager"); + "org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer$ConfigurableAliasKeyManager"); assertThat(keyManagers[0]).isNotInstanceOf(name); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java index 2074db6e901..8fdad627646 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessorTests.java @@ -57,7 +57,7 @@ class WebServerFactoryCustomizerBeanPostProcessorTests { void setBeanFactoryWhenNotListableShouldThrowException() { assertThatIllegalArgumentException().isThrownBy(() -> this.processor.setBeanFactory(mock(BeanFactory.class))) .withMessageContaining( - "WebServerCustomizerBeanPostProcessor can only " + "be used with a ListableBeanFactory"); + "WebServerCustomizerBeanPostProcessor can only be used with a ListableBeanFactory"); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java index af7b291a0f7..2301c36d81f 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java @@ -1083,7 +1083,7 @@ public abstract class AbstractServletWebServerFactoryTests { HttpComponentsClientHttpRequestFactory requestFactory, String... headers) throws IOException, URISyntaxException { ClientHttpRequest request = requestFactory.createRequest(new URI(url), method); - request.getHeaders().add("Cookie", "JSESSIONID=" + "123"); + request.getHeaders().add("Cookie", "JSESSIONID=123"); for (String header : headers) { String[] parts = header.split(":"); request.getHeaders().add(parts[0], parts[1]); diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java index 802f3169ba4..4264ef9bd72 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java @@ -199,7 +199,7 @@ public class DevToolsIntegrationTests { if (System.currentTimeMillis() > end) { throw new IllegalStateException(String.format( "server.port file '" + this.serverPortFile + "' was not written within " + timeToWait.toMillis() - + "ms. " + "Application output:%n%s%s", + + "ms. Application output:%n%s%s", FileCopyUtils.copyToString(new FileReader(this.launchedApplication.getStandardOut())), FileCopyUtils.copyToString(new FileReader(this.launchedApplication.getStandardError())))); } diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java index e07e546f671..8b307435f6b 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsWithLazyInitializationIntegrationTests.java @@ -97,7 +97,7 @@ public class DevToolsWithLazyInitializationIntegrationTests { if (System.currentTimeMillis() > end) { throw new IllegalStateException(String.format( "server.port file '" + this.serverPortFile + "' was not written within " + timeToWait.toMillis() - + "ms. " + "Application output:%n%s%s", + + "ms. Application output:%n%s%s", FileCopyUtils.copyToString(new FileReader(this.launchedApplication.getStandardOut())), FileCopyUtils.copyToString(new FileReader(this.launchedApplication.getStandardError())))); } diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/RemoteApplicationLauncher.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/RemoteApplicationLauncher.java index 124f347f69e..d6e4a0afe43 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/RemoteApplicationLauncher.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/RemoteApplicationLauncher.java @@ -100,9 +100,9 @@ abstract class RemoteApplicationLauncher extends AbstractApplicationLauncher { long end = System.currentTimeMillis() + 30000; while (serverPortFile.length() == 0) { if (System.currentTimeMillis() > end) { - throw new IllegalStateException(String.format( - "server.port file was not written within 30 seconds. " + "Application output:%n%s", - FileCopyUtils.copyToString(new FileReader(standardOut)))); + throw new IllegalStateException( + String.format("server.port file was not written within 30 seconds. Application output:%n%s", + FileCopyUtils.copyToString(new FileReader(standardOut)))); } Thread.sleep(100); } @@ -115,7 +115,7 @@ abstract class RemoteApplicationLauncher extends AbstractApplicationLauncher { long end = System.currentTimeMillis() + 30000; while (!standardOut.exists()) { if (System.currentTimeMillis() > end) { - throw new IllegalStateException("Standard out file was not written " + "within 30 seconds"); + throw new IllegalStateException("Standard out file was not written within 30 seconds"); } Thread.sleep(100); } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/src/test/java/smoketest/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/src/test/java/smoketest/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java index 1e4dd5780a4..03c9be6679a 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/src/test/java/smoketest/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/src/test/java/smoketest/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java @@ -61,7 +61,7 @@ class SampleActuatorLog4J2ApplicationTests { void validateLoggersEndpoint() throws Exception { this.mvc.perform(get("/actuator/loggers/org.apache.coyote.http11.Http11NioProtocol").header("Authorization", getBasicAuth())).andExpect(status().isOk()) - .andExpect(content().string("{\"configuredLevel\":\"WARN\"," + "\"effectiveLevel\":\"WARN\"}")); + .andExpect(content().string("{\"configuredLevel\":\"WARN\",\"effectiveLevel\":\"WARN\"}")); } private String getBasicAuth() { diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/java/smoketest/atmosphere/SampleAtmosphereApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/java/smoketest/atmosphere/SampleAtmosphereApplication.java index 7640b707219..cdb3d7435bb 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/java/smoketest/atmosphere/SampleAtmosphereApplication.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/java/smoketest/atmosphere/SampleAtmosphereApplication.java @@ -54,7 +54,7 @@ public class SampleAtmosphereApplication { "/chat/*"); registration.addInitParameter("org.atmosphere.cpr.packages", "smoketest"); registration.addInitParameter( - "org.atmosphere.interceptor.HeartbeatInterceptor" + ".clientHeartbeatFrequencyInSeconds", "10"); + "org.atmosphere.interceptor.HeartbeatInterceptor.clientHeartbeatFrequencyInSeconds", "10"); registration.setLoadOnStartup(0); // Need to occur before the EmbeddedAtmosphereInitializer registration.setOrder(Ordered.HIGHEST_PRECEDENCE); diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/main/java/smoketest/cache/CacheManagerCheck.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/main/java/smoketest/cache/CacheManagerCheck.java index 82e33af2458..fe03f60b963 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/main/java/smoketest/cache/CacheManagerCheck.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/src/main/java/smoketest/cache/CacheManagerCheck.java @@ -36,7 +36,7 @@ public class CacheManagerCheck implements CommandLineRunner { @Override public void run(String... strings) throws Exception { - logger.info("\n\n" + "=========================================================\n" + "Using cache manager: " + logger.info("\n\n=========================================================\nUsing cache manager: " + this.cacheManager.getClass().getName() + "\n" + "=========================================================\n\n"); } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java index a9650ff7ab1..ff76dbda4f3 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java @@ -59,7 +59,7 @@ public class User { @Override public String toString() { - return "User{" + "id='" + this.id + '\'' + ", firstName='" + this.firstName + '\'' + ", lastName='" + return "User{id='" + this.id + '\'' + ", firstName='" + this.firstName + '\'' + ", lastName='" + this.lastName + '\'' + '}'; } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-hateoas/src/test/java/smoketest/hateoas/SampleHateoasApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-hateoas/src/test/java/smoketest/hateoas/SampleHateoasApplicationTests.java index 55b720e06ec..f57bf049211 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-hateoas/src/test/java/smoketest/hateoas/SampleHateoasApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-hateoas/src/test/java/smoketest/hateoas/SampleHateoasApplicationTests.java @@ -41,7 +41,7 @@ class SampleHateoasApplicationTests { void hasHalLinks() { ResponseEntity entity = this.restTemplate.getForEntity("/customers/1", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); - assertThat(entity.getBody()).startsWith("{\"id\":1,\"firstName\":\"Oliver\"" + ",\"lastName\":\"Gierke\""); + assertThat(entity.getBody()).startsWith("{\"id\":1,\"firstName\":\"Oliver\",\"lastName\":\"Gierke\""); assertThat(entity.getBody()).contains("_links\":{\"self\":{\"href\""); } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jooq/src/test/java/smoketest/jooq/SampleJooqApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jooq/src/test/java/smoketest/jooq/SampleJooqApplicationTests.java index e38eabec7da..9b04eb509c9 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jooq/src/test/java/smoketest/jooq/SampleJooqApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jooq/src/test/java/smoketest/jooq/SampleJooqApplicationTests.java @@ -36,8 +36,7 @@ class SampleJooqApplicationTests { void outputResults(CapturedOutput output) { SampleJooqApplication.main(NO_ARGS); assertThat(output).contains("jOOQ Fetch 1 Greg Turnquest").contains("jOOQ Fetch 2 Craig Walls") - .contains("jOOQ SQL " + "[Learning Spring Boot : Greg Turnquest, " - + "Spring Boot in Action : Craig Walls]"); + .contains("jOOQ SQL [Learning Spring Boot : Greg Turnquest, Spring Boot in Action : Craig Walls]"); } } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-liquibase/src/test/java/smoketest/liquibase/SampleLiquibaseApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-liquibase/src/test/java/smoketest/liquibase/SampleLiquibaseApplicationTests.java index 5eecc0c7471..9be9dac6eb1 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-liquibase/src/test/java/smoketest/liquibase/SampleLiquibaseApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-liquibase/src/test/java/smoketest/liquibase/SampleLiquibaseApplicationTests.java @@ -41,12 +41,13 @@ class SampleLiquibaseApplicationTests { } } assertThat(output).contains("Successfully acquired change log lock") - .contains("Creating database history " + "table with name: PUBLIC.DATABASECHANGELOG") + .contains("Creating database history table with name: PUBLIC.DATABASECHANGELOG") .contains("Table person created") - .contains("ChangeSet classpath:/db/" + "changelog/db.changelog-master.yaml::1::" + .contains("ChangeSet classpath:/db/changelog/db.changelog-master.yaml::1::" + "marceloverdijk ran successfully") - .contains("New row inserted into person").contains("ChangeSet classpath:/db/changelog/" - + "db.changelog-master.yaml::2::" + "marceloverdijk ran successfully") + .contains("New row inserted into person") + .contains("ChangeSet classpath:/db/changelog/" + + "db.changelog-master.yaml::2::marceloverdijk ran successfully") .contains("Successfully released change log lock"); } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webservices/src/test/java/smoketest/webservices/SampleWsApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webservices/src/test/java/smoketest/webservices/SampleWsApplicationTests.java index e9f928c8666..8f982e5e825 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webservices/src/test/java/smoketest/webservices/SampleWsApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webservices/src/test/java/smoketest/webservices/SampleWsApplicationTests.java @@ -51,10 +51,10 @@ class SampleWsApplicationTests { @Test void testSendingHolidayRequest(CapturedOutput output) { final String request = "" - + " " + " 2013-10-20" - + " 2013-11-22" + " " + " " - + " 1" + " John" - + " Doe" + " " + ""; + + " 2013-10-20" + + " 2013-11-22 " + + " 1 John" + + " Doe "; StreamSource source = new StreamSource(new StringReader(request)); StreamResult result = new StreamResult(System.out); this.webServiceTemplate.sendSourceAndReceiveToResult(source, result);