Skip to content

Commit 60af42e

Browse files
authored
Merge 606ddfe into de7acb9
2 parents de7acb9 + 606ddfe commit 60af42e

13 files changed

Lines changed: 8 additions & 26 deletions

File tree

java/src/org/openqa/selenium/bidi/Connection.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import java.io.Closeable;
4040
import java.io.StringReader;
4141
import java.time.Duration;
42-
import java.util.Collections;
4342
import java.util.List;
4443
import java.util.Map;
4544
import java.util.concurrent.CompletableFuture;

java/src/org/openqa/selenium/bidi/Event.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package org.openqa.selenium.bidi;
1919

2020
import org.openqa.selenium.internal.Require;
21-
import org.openqa.selenium.json.JsonInput;
2221

2322
import java.util.Map;
2423
import java.util.function.Function;

java/src/org/openqa/selenium/devtools/events/CdpEventTypes.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.openqa.selenium.internal.Require;
2828
import org.openqa.selenium.json.Json;
2929
import org.openqa.selenium.logging.EventType;
30-
import org.openqa.selenium.logging.HasLogEvents;
3130

3231
import java.io.IOException;
3332
import java.net.URL;

java/src/org/openqa/selenium/devtools/v85/V85Events.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.openqa.selenium.devtools.v85.runtime.model.ExceptionThrown;
3232
import org.openqa.selenium.devtools.v85.runtime.model.StackTrace;
3333

34-
import java.math.BigDecimal;
3534
import java.time.Instant;
3635
import java.util.List;
3736
import java.util.Optional;

java/src/org/openqa/selenium/grid/commands/CompletionCommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import java.util.stream.StreamSupport;
3939

4040
import static java.util.stream.Collectors.joining;
41-
import static org.openqa.selenium.grid.config.StandardGridRoles.ALL_ROLES;
4241

4342
@AutoService(CliCommand.class)
4443
public class CompletionCommand implements CliCommand {

java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
import dev.failsafe.Failsafe;
8484
import dev.failsafe.RetryPolicy;
8585

86-
import java.io.Closeable;
8786
import java.io.UncheckedIOException;
8887
import java.net.URI;
8988
import java.time.Duration;
@@ -92,7 +91,6 @@
9291
import java.util.HashMap;
9392
import java.util.List;
9493
import java.util.Map;
95-
import java.util.Optional;
9694
import java.util.Set;
9795
import java.util.concurrent.ConcurrentHashMap;
9896
import java.util.concurrent.Executor;
@@ -102,7 +100,6 @@
102100
import java.util.concurrent.locks.Lock;
103101
import java.util.concurrent.locks.ReadWriteLock;
104102
import java.util.concurrent.locks.ReentrantReadWriteLock;
105-
import java.util.function.Function;
106103
import java.util.logging.Level;
107104
import java.util.logging.Logger;
108105
import java.util.stream.Collectors;
@@ -596,18 +593,15 @@ public Either<SessionNotCreatedException, CreateSessionResponse> newSession(Sess
596593
AttributeKey.EXCEPTION_MESSAGE.getKey(),
597594
EventAttribute.setValue("Will retry session " + request.getRequestId()));
598595

599-
span.setAttribute(AttributeKey.ERROR.getKey(), true);
600-
span.setStatus(Status.ABORTED);
601-
span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);
602596
} else {
603597
EXCEPTION.accept(attributeMap, lastFailure);
604598
attributeMap.put(AttributeKey.EXCEPTION_MESSAGE.getKey(),
605599
EventAttribute.setValue("Unable to create session: " + lastFailure.getMessage()));
606600

607-
span.setAttribute(AttributeKey.ERROR.getKey(), true);
608-
span.setStatus(Status.ABORTED);
609-
span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);
610601
}
602+
span.setAttribute(AttributeKey.ERROR.getKey(), true);
603+
span.setStatus(Status.ABORTED);
604+
span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);
611605
return Either.left(lastFailure);
612606
} catch (SessionNotCreatedException e) {
613607
span.setAttribute(AttributeKey.ERROR.getKey(), true);

java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.google.common.collect.ImmutableSet;
2323

2424
import org.openqa.selenium.Capabilities;
25-
import org.openqa.selenium.ImmutableCapabilities;
2625
import org.openqa.selenium.SessionNotCreatedException;
2726
import org.openqa.selenium.concurrent.GuardedRunnable;
2827
import org.openqa.selenium.grid.config.Config;

java/src/org/openqa/selenium/ie/InternetExplorerDriver.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.openqa.selenium.remote.service.DriverCommandExecutor;
3030
import org.openqa.selenium.remote.service.DriverFinder;
3131

32-
import java.io.File;
3332

3433
public class InternetExplorerDriver extends RemoteWebDriver {
3534

java/src/org/openqa/selenium/remote/ErrorHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ public Response throwIfResponseFailed(Response response, long duration) throws R
110110
if (!rawErrorData.containsKey(MESSAGE) && rawErrorData.containsKey("value")) {
111111
try {
112112
rawErrorData = (Map<String, Object>) rawErrorData.get("value");
113-
} catch (ClassCastException cce) {}
113+
} catch (ClassCastException cce) {
114+
throw new RuntimeException(cce);
115+
}
114116
}
115117
try {
116118
message = (String) rawErrorData.get(MESSAGE);

java/src/org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
import org.openqa.selenium.InvalidSelectorException;
2424
import org.openqa.selenium.WebDriverException;
25-
import org.openqa.selenium.interactions.PointerInput;
2625
import org.openqa.selenium.remote.codec.AbstractHttpCommandCodec;
2726
import org.openqa.selenium.remote.internal.WebElementToJsonConverter;
2827

0 commit comments

Comments
 (0)