Reformat code following spring-javaformat upgrade

This commit is contained in:
Phillip Webb
2023-02-21 22:49:23 -08:00
parent b93c9f7fec
commit df5898a146
1878 changed files with 27649 additions and 22403 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@ class JarCommandIT {
invocation.await();
assertThat(invocation.getStandardOutput()).isEqualTo("");
assertThat(invocation.getErrorOutput())
.contains("The name of the resulting jar and at least one source file must be specified");
.contains("The name of the resulting jar and at least one source file must be specified");
}
@Test
@@ -64,7 +64,7 @@ class JarCommandIT {
invocation.await();
assertThat(invocation.getStandardOutput()).isEqualTo("");
assertThat(invocation.getErrorOutput())
.contains("The name of the resulting jar and at least one source file must be specified");
.contains("The name of the resulting jar and at least one source file must be specified");
}
@Test
@@ -109,9 +109,12 @@ class JarCommandIT {
assertThat(invocation.getErrorOutput()).isEqualTo("");
}
assertThat(invocation.getStandardOutput()).contains("Hello World!")
.contains("/BOOT-INF/classes!/public/public.txt").contains("/BOOT-INF/classes!/resources/resource.txt")
.contains("/BOOT-INF/classes!/static/static.txt").contains("/BOOT-INF/classes!/templates/template.txt")
.contains("/BOOT-INF/classes!/root.properties").contains("Goodbye Mama");
.contains("/BOOT-INF/classes!/public/public.txt")
.contains("/BOOT-INF/classes!/resources/resource.txt")
.contains("/BOOT-INF/classes!/static/static.txt")
.contains("/BOOT-INF/classes!/templates/template.txt")
.contains("/BOOT-INF/classes!/root.properties")
.contains("Goodbye Mama");
}
@Test
@@ -132,9 +135,12 @@ class JarCommandIT {
if (!JAVA_9_OR_LATER) {
assertThat(invocation.getErrorOutput()).isEqualTo("");
}
assertThat(invocation.getStandardOutput()).contains("Hello World!").doesNotContain("/public/public.txt")
.doesNotContain("/resources/resource.txt").contains("/static/static.txt")
.contains("/templates/template.txt").contains("Goodbye Mama");
assertThat(invocation.getStandardOutput()).contains("Hello World!")
.doesNotContain("/public/public.txt")
.doesNotContain("/resources/resource.txt")
.contains("/static/static.txt")
.contains("/templates/template.txt")
.contains("Goodbye Mama");
}
private static boolean isClassPresent(String name) {

View File

@@ -133,9 +133,9 @@ public final class CommandLineInvoker {
public Invocation(Process process) {
this.process = process;
this.streamReaders
.add(new Thread(new StreamReadingRunnable(this.process.getErrorStream(), this.err, this.combined)));
.add(new Thread(new StreamReadingRunnable(this.process.getErrorStream(), this.err, this.combined)));
this.streamReaders
.add(new Thread(new StreamReadingRunnable(this.process.getInputStream(), this.out, this.combined)));
.add(new Thread(new StreamReadingRunnable(this.process.getInputStream(), this.out, this.combined)));
for (Thread streamReader : this.streamReaders) {
streamReader.start();
}