Skip to content

Commit 86e2708

Browse files
committed
[java] Code formatting to match the project code style, no functional changes
1 parent 4b8fcd6 commit 86e2708

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

java/client/src/org/openqa/selenium/remote/ProtocolHandshake.java

+18-18
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ public Result createSession(HttpHandler client, Command command) throws IOExcept
6262
int threshold = (int) Math.min(Runtime.getRuntime().freeMemory() / 10, Integer.MAX_VALUE);
6363
FileBackedOutputStream os = new FileBackedOutputStream(threshold);
6464
try (
65-
CountingOutputStream counter = new CountingOutputStream(os);
66-
Writer writer = new OutputStreamWriter(counter, UTF_8);
67-
NewSessionPayload payload = NewSessionPayload.create(desired)) {
65+
CountingOutputStream counter = new CountingOutputStream(os);
66+
Writer writer = new OutputStreamWriter(counter, UTF_8);
67+
NewSessionPayload payload = NewSessionPayload.create(desired)) {
6868

6969
payload.writeTo(writer);
7070

@@ -83,10 +83,10 @@ public Result createSession(HttpHandler client, Command command) throws IOExcept
8383
}
8484

8585
throw new SessionNotCreatedException(
86-
String.format(
87-
"Unable to create new remote session. " +
88-
"desired capabilities = %s",
89-
desired));
86+
String.format(
87+
"Unable to create new remote session. " +
88+
"desired capabilities = %s",
89+
desired));
9090
}
9191

9292
Optional<Result> createSession(HttpHandler client, InputStream newSessionBlob, long size) {
@@ -110,25 +110,25 @@ Optional<Result> createSession(HttpHandler client, InputStream newSessionBlob, l
110110
blob = new Json().toType(string(response), Map.class);
111111
} catch (JsonException e) {
112112
throw new WebDriverException(
113-
"Unable to parse remote response: " + string(response), e);
113+
"Unable to parse remote response: " + string(response), e);
114114
}
115115

116116
InitialHandshakeResponse initialResponse = new InitialHandshakeResponse(
117-
time,
118-
response.getStatus(),
119-
blob);
117+
time,
118+
response.getStatus(),
119+
blob);
120120

121121
return Stream.of(
122-
new W3CHandshakeResponse().getResponseFunction(),
123-
new JsonWireProtocolResponse().getResponseFunction())
124-
.map(func -> func.apply(initialResponse))
125-
.filter(Objects::nonNull)
126-
.findFirst();
122+
new W3CHandshakeResponse().getResponseFunction(),
123+
new JsonWireProtocolResponse().getResponseFunction())
124+
.map(func -> func.apply(initialResponse))
125+
.filter(Objects::nonNull)
126+
.findFirst();
127127
}
128128

129129
public static class Result {
130130

131-
private static Function<Object, Proxy> massageProxy = obj -> {
131+
private static final Function<Object, Proxy> massageProxy = obj -> {
132132
if (obj instanceof Proxy) {
133133
return (Proxy) obj;
134134
}
@@ -161,7 +161,7 @@ public static class Result {
161161
if (capabilities.containsKey(PROXY)) {
162162
//noinspection unchecked
163163
((Map<String, Object>) capabilities)
164-
.put(PROXY, massageProxy.apply(capabilities.get(PROXY)));
164+
.put(PROXY, massageProxy.apply(capabilities.get(PROXY)));
165165
}
166166
}
167167

0 commit comments

Comments
 (0)