Merge previously split strings
Merge some string lines that were previously split because of the 90 chars wide formatting.
This commit is contained in:
@@ -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<String, String> annotations;
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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 + '\'' + '}';
|
||||
}
|
||||
|
||||
|
||||
@@ -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 + '\'' + '}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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 + '}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ItemHint implements Comparable<ItemHint> {
|
||||
|
||||
@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<ItemHint> {
|
||||
|
||||
@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<ItemHint> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValueProvider{" + "name='" + this.name + "', parameters=" + this.parameters + '}';
|
||||
return "ValueProvider{name='" + this.name + "', parameters=" + this.parameters + '}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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<FileCollection>) () -> {
|
||||
JavaPluginConvention convention = project.getConvention().getPlugin(JavaPluginConvention.class);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class SpringBootPlugin implements Plugin<Project> {
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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?");
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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<JMXConnector> {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user