Skip to content

Commit 22827f9

Browse files
committed
Add Nullable annotations to parameters in EdgeDriverService and DriverService constructors
1 parent 4c2b772 commit 22827f9

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

java/src/org/openqa/selenium/edge/EdgeDriverService.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ public class EdgeDriverService extends DriverService {
9797
* @throws IOException If an I/O error occurs.
9898
*/
9999
public EdgeDriverService(
100-
File executable,
100+
@Nullable File executable,
101101
int port,
102-
Duration timeout,
103-
List<String> args,
104-
Map<String, String> environment)
102+
@Nullable Duration timeout,
103+
@Nullable List<String> args,
104+
@Nullable Map<String, String> environment)
105105
throws IOException {
106106
super(executable, port, timeout, List.copyOf(args), Map.copyOf(environment));
107107
}
@@ -197,7 +197,7 @@ public Builder withBuildCheckDisabled(boolean noBuildCheck) {
197197
* @param logLevel {@link ChromiumDriverLogLevel} for desired log level output.
198198
* @return A self reference.
199199
*/
200-
public Builder withLoglevel(ChromiumDriverLogLevel logLevel) {
200+
public Builder withLoglevel(@Nullable ChromiumDriverLogLevel logLevel) {
201201
this.logLevel = logLevel;
202202
this.silent = false;
203203
this.verbose = false;
@@ -239,7 +239,7 @@ public Builder withVerbose(boolean verbose) {
239239
* @param allowedListIps Comma-separated list of remote IPv4 addresses.
240240
* @return A self reference.
241241
*/
242-
public Builder withAllowedListIps(String allowedListIps) {
242+
public Builder withAllowedListIps(@Nullable String allowedListIps) {
243243
this.allowedListIps = allowedListIps;
244244
return this;
245245
}
@@ -250,7 +250,7 @@ public Builder withAllowedListIps(String allowedListIps) {
250250
* @param readableTimestamp Whether the timestamp of the log is readable.
251251
* @return A self reference.
252252
*/
253-
public Builder withReadableTimestamp(Boolean readableTimestamp) {
253+
public Builder withReadableTimestamp(@Nullable Boolean readableTimestamp) {
254254
this.readableTimestamp = readableTimestamp;
255255
return this;
256256
}
@@ -322,7 +322,7 @@ protected List<String> createArgs() {
322322

323323
@Override
324324
protected EdgeDriverService createDriverService(
325-
File exe, int port, Duration timeout, List<String> args, Map<String, String> environment) {
325+
@Nullable File exe, int port, @Nullable Duration timeout, @Nullable List<String> args, @Nullable Map<String, String> environment) {
326326
try {
327327
return new EdgeDriverService(exe, port, timeout, args, environment);
328328
} catch (IOException e) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ public class DriverService implements Closeable {
106106
* @throws IOException If an I/O error occurs.
107107
*/
108108
protected DriverService(
109-
File executable,
109+
@Nullable File executable,
110110
int port,
111-
Duration timeout,
112-
List<String> args,
113-
Map<String, String> environment)
111+
@Nullable Duration timeout,
112+
@Nullable List<String> args,
113+
@Nullable Map<String, String> environment)
114114
throws IOException {
115115
if (executable != null) {
116116
this.executable = executable.getCanonicalPath();

0 commit comments

Comments
 (0)