Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Feb 21, 2024
1 parent 3350a3e commit ad36741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import javax.annotation.Nullable;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystems;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
Expand All @@ -52,7 +53,7 @@ private static String getPathToClass(@Nonnull Class<?> mainClass) {
public static Process buildProcess(boolean inheritOutput, @Nonnull Class<?> mainClass,
@Nullable Map<String, String> additionalEnvironmentVariables,
@Nullable Map<String, String> additionSystemVariables, String... params) throws IOException {
String fileSeparator = System.getProperty("file.separator");
String fileSeparator = FileSystems.getDefault().getSeparator();
String javaHome = System.getProperty("java.home");
String executablePath = joinWith(fileSeparator, javaHome, "bin", "java");
File executableFile = new File(executablePath);
Expand Down Expand Up @@ -136,7 +137,7 @@ public static String waitForLine(final BufferedReader reader, final BufferedRead
if (errorReader.ready()) {
errorLines = IOUtils.readLines(errorReader);
}
String lineSeparator = System.getProperty("line.separator");
String lineSeparator = System.lineSeparator();
throw new IllegalStateException("Unable to run test class: " + String.join(lineSeparator, errorLines));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public List<String> call() throws Exception {
StringBuilder builder = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
if (line.equals("")) {
if (line.isEmpty()) {
break;
}
builder.append(line);
Expand Down

0 comments on commit ad36741

Please sign in to comment.