Skip to content

Commit f515268

Browse files
committed
Undo whitespace changes
1 parent 83b763f commit f515268

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

src/test/java/io/vertx/starter/service/GeneratorTest.java

+44-44
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ private static String computeJavaHome(String generatorJavaHomeEnv, int minimumJa
105105
int javaVersion;
106106
try {
107107
java.lang.Process process = new ProcessBuilder(java.getAbsolutePath(), "--version")
108-
.directory(bin)
109-
.redirectOutput(versionFile.toFile())
110-
.start();
108+
.directory(bin)
109+
.redirectOutput(versionFile.toFile())
110+
.start();
111111
process.waitFor(5, SECONDS);
112112
javaVersion = Integer.parseInt(Files.readAllLines(versionFile)
113-
.get(0)
114-
.split("\\s")[1]
115-
.split("\\.")[0]);
113+
.get(0)
114+
.split("\\s")[1]
115+
.split("\\.")[0]);
116116
} catch (InterruptedException e) {
117117
Thread.currentThread().interrupt();
118118
throw new RuntimeException(e);
@@ -148,18 +148,18 @@ static void afterAll() throws Exception {
148148

149149
static VertxProject defaultProject() {
150150
return new VertxProject()
151-
.setId("demo")
152-
.setGroupId("com.example")
153-
.setArtifactId("demo")
154-
.setArchiveFormat(TGZ);
151+
.setId("demo")
152+
.setGroupId("com.example")
153+
.setArtifactId("demo")
154+
.setArchiveFormat(TGZ);
155155
}
156156

157157
static Stream<VertxProject> testProjects() throws IOException {
158158
List<String> versions = Util.loadStarterData().getJsonArray("versions").stream()
159-
.map(JsonObject.class::cast)
160-
.map(obj -> obj.getString("number"))
161-
.filter(version -> !version.endsWith("-SNAPSHOT"))
162-
.toList();
159+
.map(JsonObject.class::cast)
160+
.map(obj -> obj.getString("number"))
161+
.filter(version -> !version.endsWith("-SNAPSHOT"))
162+
.toList();
163163

164164
List<Set<String>> testDeps = Arrays.asList(Collections.singleton("vertx-unit"),
165165
Collections.singleton("vertx-junit5"));
@@ -170,11 +170,11 @@ static Stream<VertxProject> testProjects() throws IOException {
170170
for (String version : versions) {
171171
for (Set<String> vertxDependencies : testDeps) {
172172
VertxProject vertxProject = defaultProject()
173-
.setBuildTool(buildTool)
174-
.setLanguage(language)
175-
.setVertxVersion(version)
176-
.setVertxDependencies(new HashSet<>(vertxDependencies))
177-
.setPackageName("com.mycompany.project.special");
173+
.setBuildTool(buildTool)
174+
.setLanguage(language)
175+
.setVertxVersion(version)
176+
.setVertxDependencies(new HashSet<>(vertxDependencies))
177+
.setPackageName("com.mycompany.project.special");
178178
builder.add(vertxProject);
179179
}
180180
}
@@ -322,14 +322,14 @@ private void verifyGradleOutputFiles() throws IOException {
322322
private void verifySourceFiles(Language language) throws IOException {
323323
try (Stream<Path> pathStream = Files.walk(workdir.resolve("src/main/" + language.getName()))) {
324324
Optional<Path> verticleFile = pathStream
325-
.filter(p -> p.endsWith("MainVerticle" + language.getExtension()))
326-
.findFirst();
325+
.filter(p -> p.endsWith("MainVerticle" + language.getExtension()))
326+
.findFirst();
327327
assertThat(verticleFile).isPresent().hasValueSatisfying(p -> assertThat(p).isRegularFile());
328328
}
329329
try (Stream<Path> pathStream = Files.walk(workdir.resolve("src/test/" + language.getName()))) {
330330
Optional<Path> testFile = pathStream
331-
.filter(p -> p.endsWith("TestMainVerticle" + language.getExtension()))
332-
.findFirst();
331+
.filter(p -> p.endsWith("TestMainVerticle" + language.getExtension()))
332+
.findFirst();
333333
assertThat(testFile).isPresent().hasValueSatisfying(p -> assertThat(p).isRegularFile());
334334
}
335335
}
@@ -343,22 +343,22 @@ private void buildProject(Vertx vertx, BuildTool buildTool, String javaHome, Han
343343
if (buildTool == MAVEN) {
344344
command = "./mvnw";
345345
args = Stream.<String>builder()
346-
.add("-Dmaven.repo.local=" + mavenRepository.toAbsolutePath())
347-
.add("-s")
348-
.add(settingsFile.toAbsolutePath().toString())
349-
.add("-B")
350-
.add("verify")
351-
.build()
352-
.collect(toList());
346+
.add("-Dmaven.repo.local=" + mavenRepository.toAbsolutePath())
347+
.add("-s")
348+
.add(settingsFile.toAbsolutePath().toString())
349+
.add("-B")
350+
.add("verify")
351+
.build()
352+
.collect(toList());
353353
} else if (buildTool == GRADLE) {
354354
command = "./gradlew";
355355
args = Stream.<String>builder()
356-
.add("--no-build-cache")
357-
.add("--no-daemon")
358-
.add("assemble")
359-
.add("check")
360-
.build()
361-
.collect(toList());
356+
.add("--no-build-cache")
357+
.add("--no-daemon")
358+
.add("assemble")
359+
.add("check")
360+
.build()
361+
.collect(toList());
362362
} else {
363363
handler.handle(Future.failedFuture(unsupported(buildTool)));
364364
return;
@@ -399,13 +399,13 @@ private void runDevMode(Vertx vertx, BuildTool buildTool, String javaHome, Handl
399399
Promise<Void> promise = Promise.promise();
400400
promise.future().onComplete(handler);
401401
RecordParser parser = RecordParser.newDelimited("\n")
402-
.exceptionHandler(promise::tryFail)
403-
.handler(buffer -> {
404-
String line = buffer.toString().trim();
405-
if (line.contains("HTTP server started on port 8888")) {
406-
promise.tryComplete();
407-
}
408-
});
402+
.exceptionHandler(promise::tryFail)
403+
.handler(buffer -> {
404+
String line = buffer.toString().trim();
405+
if (line.contains("HTTP server started on port 8888")) {
406+
promise.tryComplete();
407+
}
408+
});
409409
process.stdout().exceptionHandler(promise::tryFail).handler(parser);
410410
}).start();
411411
}
@@ -414,7 +414,7 @@ private void runDevMode(Vertx vertx, BuildTool buildTool, String javaHome, Handl
414414
private void unpack(Vertx vertx, Path workdir, Buffer buffer, Handler<AsyncResult<Void>> handler) {
415415
vertx.<Void>executeBlocking(() -> {
416416
try (ByteArrayInputStream bais = new ByteArrayInputStream(buffer.getBytes());
417-
TarArchiveInputStream ais = new TarArchiveInputStream(new GzipCompressorInputStream(bais))) {
417+
TarArchiveInputStream ais = new TarArchiveInputStream(new GzipCompressorInputStream(bais))) {
418418

419419
TarArchiveEntry entry;
420420
while ((entry = ais.getNextTarEntry()) != null) {

0 commit comments

Comments
 (0)