Skip to content
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/devtools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ java_library(
deps = [
"//java/src/org/openqa/selenium:core",
"//java/src/org/openqa/selenium/json",
"@maven//:org_jspecify_jspecify",
],
)

Expand Down Expand Up @@ -75,6 +76,7 @@ java_library(
"//java/src/org/openqa/selenium:core",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/remote/http",
"@maven//:org_jspecify_jspecify",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.openqa.selenium.devtools;

import org.jspecify.annotations.NullMarked;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.remote.http.Filter;
import org.openqa.selenium.remote.http.HttpHandler;
Expand All @@ -26,4 +27,5 @@
* browser fails to send a HTTP request. It can be caught in a {@link Filter} to handle the error
* by, for example, returning a custom HTTP response.
*/
@NullMarked
public class RequestFailedException extends WebDriverException {}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ java_export(
"//java/src/org/openqa/selenium/grid",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/remote",
"@maven//:org_jspecify_jspecify",
artifact("com.beust:jcommander"),
artifact("com.google.guava:guava"),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,25 @@

package org.openqa.selenium.grid.sessionmap.jdbc;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.openqa.selenium.WebDriverException;

@NullMarked
public class JdbcException extends WebDriverException {
public JdbcException() {
super();
}

public JdbcException(String message) {
public JdbcException(@Nullable String message) {
super(message);
}

public JdbcException(Throwable cause) {
public JdbcException(@Nullable Throwable cause) {
super(cause);
}

public JdbcException(String message, Throwable cause) {
public JdbcException(@Nullable String message, @Nullable Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@

package org.openqa.selenium.remote;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.remote.service.DriverFinder;

/** Thrown by {@link DriverFinder#getDriverPath()} (DriverService, Capabilities)}. */
@NullMarked
public class NoSuchDriverException extends WebDriverException {

private static final String SUPPORT_URL = BASE_SUPPORT_URL + "/driver_location/";

public NoSuchDriverException(String reason) {
public NoSuchDriverException(@Nullable String reason) {
super(reason);
}

public NoSuchDriverException(String reason, Throwable cause) {
public NoSuchDriverException(@Nullable String reason, @Nullable Throwable cause) {
super(reason, cause);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.openqa.selenium.remote;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.openqa.selenium.WebDriverException;

/**
Expand All @@ -33,12 +35,13 @@
*
* 1)
*/
@NullMarked
public class UnreachableBrowserException extends WebDriverException {
public UnreachableBrowserException(String message) {
public UnreachableBrowserException(@Nullable String message) {
super(message);
}

public UnreachableBrowserException(String message, Throwable cause) {
public UnreachableBrowserException(@Nullable String message, @Nullable Throwable cause) {
super(message, cause);
}
}
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/remote/http/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ java_export(
"//java:auto-service",
"//java/src/org/openqa/selenium:core",
"//java/src/org/openqa/selenium/json",
"@maven//:org_jspecify_jspecify",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@

package org.openqa.selenium.remote.http;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.openqa.selenium.WebDriverException;

@NullMarked
public class ConnectionFailedException extends WebDriverException {

public ConnectionFailedException(String message) {
public ConnectionFailedException(@Nullable String message) {
super(message);
}

public ConnectionFailedException(String message, Throwable cause) {
public ConnectionFailedException(@Nullable String message, @Nullable Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@

package org.openqa.selenium.safari;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.openqa.selenium.WebDriverException;

/** Exception thrown when the connection to the SafariDriver is lost. */
@NullMarked
public class ConnectionClosedException extends WebDriverException {

public ConnectionClosedException(String message) {
public ConnectionClosedException(@Nullable String message) {
super(message);
}
}
Loading