Merge previously split strings

Merge some string lines that were previously split because of the
90 chars wide formatting.
This commit is contained in:
Phillip Webb 2019-07-14 19:39:18 +01:00
parent c3816bfe7b
commit 01933f9b06
173 changed files with 351 additions and 370 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -57,7 +57,7 @@ class CachesEndpointDocumentationTests extends MockMvcEndpointDocumentationTests
private static final List<ParameterDescriptor> 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."))));
}

View File

@ -66,15 +66,14 @@ class ConditionsReportEndpointDocumentationTests extends MockMvcEndpointDocument
@Test
void conditions() throws Exception {
List<FieldDescriptor> 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<FieldDescriptor> 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(),

View File

@ -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)

View File

@ -59,8 +59,7 @@ class HealthEndpointDocumentationTests extends MockMvcEndpointDocumentationTests
private static final List<FieldDescriptor> 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

View File

@ -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"),

View File

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

View File

@ -100,23 +100,23 @@ class MappingsEndpointReactiveDocumentationTests extends AbstractEndpointDocumen
requestMappingConditionField(".produces.[].negated").description("Whether the media type is negated."));
List<FieldDescriptor> 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<FieldDescriptor> 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<FieldDescriptor> 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);

View File

@ -89,10 +89,10 @@ class MappingsEndpointServletDocumentationTests extends AbstractEndpointDocument
.description("Dispatcher handler mappings, if any.").optional().type(JsonFieldType.OBJECT),
parentIdField());
List<FieldDescriptor> 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<FieldDescriptor> requestMappingConditions = Arrays.asList(
@ -117,12 +117,12 @@ class MappingsEndpointServletDocumentationTests extends AbstractEndpointDocument
requestMappingConditionField(".produces.[].negated").description("Whether the media type is negated."));
List<FieldDescriptor> 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()

View File

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

View File

@ -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

View File

@ -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."),

View File

@ -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")

View File

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

View File

@ -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'?");
});
}

View File

@ -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'?");
});
}

View File

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

View File

@ -32,7 +32,7 @@ public class NonUniqueCacheException extends RuntimeException {
private final Collection<String> cacheManagerNames;
public NonUniqueCacheException(String cacheName, Collection<String> 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);

View File

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

View File

@ -35,7 +35,7 @@ public final class MissingParametersException extends InvalidEndpointRequestExce
private final Set<OperationParameter> missingParameters;
public MissingParametersException(Set<OperationParameter> 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(",")));

View File

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

View File

@ -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 + '}';
}
}

View File

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

View File

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

View File

@ -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}";
}
}

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -50,7 +50,7 @@ class OnResourceCondition extends SpringBootCondition {
List<String> 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<String> missing = new ArrayList<>();
for (String location : locations) {
String resource = context.getEnvironment().resolvePlaceholders(location);

View File

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

View File

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

View File

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

View File

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

View File

@ -177,7 +177,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
private List<HttpMessageConverter<?>> getDefaultConverters() {
List<HttpMessageConverter<?>> 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() {

View File

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

View File

@ -70,7 +70,7 @@ class DataSourceBeanCreationFailureAnalyzer extends AbstractFailureAnalyzer<Data
action.append(String.format("Consider the following:%n"));
if (EmbeddedDatabaseConnection.NONE == cause.getConnection()) {
action.append(String.format(
"\tIf you want an embedded database (H2, HSQL or " + "Derby), please put it on the classpath.%n"));
"\tIf you want an embedded database (H2, HSQL or Derby), please put it on the classpath.%n"));
}
else {
action.append(String.format("\tReview the configuration of %s%n.", cause.getConnection()));

View File

@ -37,9 +37,9 @@ class HikariDriverConfigurationFailureAnalyzer extends AbstractFailureAnalyzer<C
return null;
}
return new FailureAnalysis(
"Configuration of the Hikari connection pool failed: " + "'dataSourceClassName' is not supported.",
"Configuration of the Hikari connection pool failed: 'dataSourceClassName' is not supported.",
"Spring Boot auto-configures only a driver and can't specify a custom "
+ "DataSource. Consider configuring the Hikari DataSource in " + "your own configuration.",
+ "DataSource. Consider configuring the Hikari DataSource in your own configuration.",
cause);
}

View File

@ -55,7 +55,7 @@ class ActiveMQConnectionFactoryFactory {
return doCreateConnectionFactory(factoryClass);
}
catch (Exception ex) {
throw new IllegalStateException("Unable to create " + "ActiveMQConnectionFactory", ex);
throw new IllegalStateException("Unable to create ActiveMQConnectionFactory", ex);
}
}

View File

@ -62,7 +62,7 @@ class ArtemisConnectionFactoryFactory {
return doCreateConnectionFactory(factoryClass);
}
catch (Exception ex) {
throw new IllegalStateException("Unable to create " + "ActiveMQConnectionFactory", ex);
throw new IllegalStateException("Unable to create ActiveMQConnectionFactory", ex);
}
}
@ -109,7 +109,7 @@ class ArtemisConnectionFactoryFactory {
}
catch (NoClassDefFoundError ex) {
throw new IllegalStateException("Unable to create InVM "
+ "Artemis connection, ensure that artemis-jms-server.jar " + "is in the classpath", ex);
+ "Artemis connection, ensure that artemis-jms-server.jar is in the classpath", ex);
}
}

View File

@ -100,7 +100,7 @@ public class LiquibaseAutoConfiguration {
if (this.properties.isCheckChangeLogLocation()) {
Resource resource = this.resourceLoader.getResource(this.properties.getChangeLog());
Assert.state(resource.exists(), () -> "Cannot find changelog location: " + resource
+ " (please add changelog or check your Liquibase " + "configuration)");
+ " (please add changelog or check your Liquibase configuration)");
}
}

View File

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

View File

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

View File

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

View File

@ -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()) {

View File

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

View File

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

View File

@ -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";
/**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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,

View File

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

View File

@ -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

View File

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

View File

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

View File

@ -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

View File

@ -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"))

View File

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

View File

@ -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

View File

@ -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<ServerAddress> allAddresses = getAllAddresses(client);
assertThat(allAddresses).hasSize(2);

View File

@ -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<ServerAddress> 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

View File

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

View File

@ -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

View File

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

View File

@ -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<Object>(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),

View File

@ -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 {

View File

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

View File

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

View File

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

View File

@ -52,7 +52,7 @@ public class InstallCommand extends OptionParsingCommand {
protected ExitStatus run(OptionSet options) throws Exception {
List<String> args = (List<String>) 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);
}

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

@ -108,9 +108,9 @@ public class MockRestServiceServerAutoConfiguration {
private RequestExpectationManager getDelegate() {
Map<RestTemplate, RequestExpectationManager> 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();
}

View File

@ -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

View File

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

View File

@ -69,12 +69,12 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
private void logDuplicateJsonObjectsWarning(List<URL> 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);
}

View File

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

View File

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

View File

@ -178,7 +178,7 @@ class ApplicationContextAssertProviderTests {
void toStringWhenContextFailsToStartShouldReturnSimpleString() {
ApplicationContextAssertProvider<ApplicationContext> 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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More