Skip to content

Commit 6e545d8

Browse files
committed
[grid] Removing unused imports, formatting changes and removing CLI default
1 parent 9a98924 commit 6e545d8

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

java/server/src/org/openqa/selenium/grid/docker/DockerAssetsPath.java

-9
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,9 @@
2020
import org.openqa.selenium.remote.SessionId;
2121

2222
import java.io.File;
23-
import java.io.IOException;
24-
import java.nio.file.Files;
25-
import java.nio.file.Path;
26-
import java.nio.file.Paths;
27-
import java.util.Optional;
28-
import java.util.logging.Level;
29-
import java.util.logging.Logger;
3023

3124
public class DockerAssetsPath {
3225

33-
private static final Logger LOG = Logger.getLogger(DockerAssetsPath.class.getName());
34-
3526
private final String hostPath;
3627
private final String containerPath;
3728

java/server/src/org/openqa/selenium/grid/docker/DockerSessionFactory.java

+12-4
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ public DockerSessionFactory(
114114
@Override
115115
public boolean test(Capabilities capabilities) {
116116
return stereotype.getCapabilityNames().stream()
117-
.map(name -> Objects.equals(stereotype.getCapability(name), capabilities.getCapability(name)))
117+
.map(
118+
name ->
119+
Objects.equals(stereotype.getCapability(name), capabilities.getCapability(name)))
118120
.reduce(Boolean::logicalAnd)
119121
.orElse(false);
120122
}
@@ -170,7 +172,9 @@ public Optional<ActiveSession> apply(CreateSessionRequest sessionRequest) {
170172
try {
171173
result = new ProtocolHandshake().createSession(client, command);
172174
response = result.createResponse();
173-
attributeMap.put(AttributeKey.DRIVER_RESPONSE.getKey(), EventAttribute.setValue(response.toString()));
175+
attributeMap.put(
176+
AttributeKey.DRIVER_RESPONSE.getKey(),
177+
EventAttribute.setValue(response.toString()));
174178
} catch (IOException | RuntimeException e) {
175179
span.setAttribute("error", true);
176180
span.setStatus(Status.CANCELLED);
@@ -204,8 +208,12 @@ public Optional<ActiveSession> apply(CreateSessionRequest sessionRequest) {
204208
Dialect downstream = sessionRequest.getDownstreamDialects().contains(result.getDialect()) ?
205209
result.getDialect() :
206210
W3C;
207-
attributeMap.put(AttributeKey.DOWNSTREAM_DIALECT.getKey(), EventAttribute.setValue(downstream.toString()));
208-
attributeMap.put(AttributeKey.DRIVER_RESPONSE.getKey(), EventAttribute.setValue(response.toString()));
211+
attributeMap.put(
212+
AttributeKey.DOWNSTREAM_DIALECT.getKey(),
213+
EventAttribute.setValue(downstream.toString()));
214+
attributeMap.put(
215+
AttributeKey.DRIVER_RESPONSE.getKey(),
216+
EventAttribute.setValue(response.toString()));
209217

210218
span.addEvent("Docker driver service created session", attributeMap);
211219
LOG.fine(String.format(

java/server/src/org/openqa/selenium/grid/log/LoggingFlags.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class LoggingFlags implements HasRoles {
5959
"Log levels are described here https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html ",
6060
names = "--log-level", arity = 1)
6161
@ConfigValue(section = "logging", name = "log-level", example = "INFO")
62-
private String logLevel = Level.INFO.getName();
62+
private String logLevel;
6363

6464
@Override
6565
public Set<Role> getRoles() {

0 commit comments

Comments
 (0)