Skip to content

Commit 1560a71

Browse files
committed
[java] Add JSpecify annotations for nullable return types in DriverService
1 parent 8f65de2 commit 1560a71

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

java/src/org/openqa/selenium/remote/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ java_library(
7777
"//java/src/org/openqa/selenium/support/decorators",
7878
artifact("com.google.guava:guava"),
7979
artifact("net.bytebuddy:byte-buddy"),
80+
artifact("org.jspecify:jspecify"),
8081
],
8182
)
8283

java/src/org/openqa/selenium/remote/service/DriverService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.openqa.selenium.net.PortProber;
5050
import org.openqa.selenium.net.UrlChecker;
5151
import org.openqa.selenium.os.ExternalProcess;
52+
import org.jspecify.annotations.Nullable;
5253

5354
/**
5455
* Manages the life and death of a native executable driver server. It is expected that the driver
@@ -145,15 +146,15 @@ protected Capabilities getDefaultDriverOptions() {
145146
return new ImmutableCapabilities();
146147
}
147148

148-
protected String getDriverName() {
149+
protected @Nullable String getDriverName() {
149150
return null;
150151
}
151152

152-
public String getDriverProperty() {
153+
public @Nullable String getDriverProperty() {
153154
return null;
154155
}
155156

156-
protected File getDriverExecutable() {
157+
protected @Nullable File getDriverExecutable() {
157158
return null;
158159
}
159160

0 commit comments

Comments
 (0)