Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions java/src/dev/selenium/tools/modules/ModuleGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import java.nio.file.SimpleFileVisitor;
import java.nio.file.StandardCopyOption;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
Expand Down Expand Up @@ -213,11 +214,9 @@ public static void main(String[] args) throws IOException {
}
if (result != 0) {
throw new RuntimeException(
"Unable to process module:\n"
+ "jdeps "
+ String.join(" ", jdepsArgs)
+ "\n"
+ new String(bos.toByteArray()));
String.format(
"Unable to process module:%njdeps %s%n%s",
String.join(" ", jdepsArgs), bos.toString(StandardCharsets.UTF_8)));
}

AtomicReference<Path> moduleInfo = new AtomicReference<>();
Expand Down
2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public static Platform extractFromSysProperty(String osName, String osVersion) {
String previousMatch = null;
for (Platform os : Platform.values()) {
for (String matcher : os.partOfOsName) {
if ("".equals(matcher)) {
if (matcher.isEmpty()) {
continue;
}
matcher = matcher.toLowerCase(Locale.ENGLISH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public HttpRequest encode(Command command) {
byte[] data = content.getBytes(UTF_8);

request.setHeader(HttpHeader.ContentLength.getName(), String.valueOf(data.length));
request.setHeader(HttpHeader.ContentType.getName(), JSON_UTF_8.toString());
request.setHeader(HttpHeader.ContentType.getName(), JSON_UTF_8);
request.setContent(bytes(data));
}

Expand Down
Loading