29
29
import java .util .List ;
30
30
import java .util .Locale ;
31
31
import java .util .Map ;
32
+ import org .jspecify .annotations .Nullable ;
32
33
import org .openqa .selenium .Capabilities ;
33
34
import org .openqa .selenium .WebDriverException ;
34
35
import org .openqa .selenium .chromium .ChromiumDriverLogLevel ;
@@ -96,11 +97,11 @@ public class EdgeDriverService extends DriverService {
96
97
* @throws IOException If an I/O error occurs.
97
98
*/
98
99
public EdgeDriverService (
99
- File executable ,
100
+ @ Nullable File executable ,
100
101
int port ,
101
- Duration timeout ,
102
- List <String > args ,
103
- Map <String , String > environment )
102
+ @ Nullable Duration timeout ,
103
+ @ Nullable List <String > args ,
104
+ @ Nullable Map <String , String > environment )
104
105
throws IOException {
105
106
super (executable , port , timeout , List .copyOf (args ), Map .copyOf (environment ));
106
107
}
@@ -139,13 +140,13 @@ public static EdgeDriverService createDefaultService() {
139
140
@ AutoService (DriverService .Builder .class )
140
141
public static class Builder extends DriverService .Builder <EdgeDriverService , Builder > {
141
142
142
- private Boolean disableBuildCheck ;
143
- private Boolean readableTimestamp ;
144
- private Boolean appendLog ;
145
- private Boolean verbose ;
146
- private Boolean silent ;
147
- private String allowedListIps ;
148
- private ChromiumDriverLogLevel logLevel ;
143
+ @ Nullable private Boolean disableBuildCheck ;
144
+ @ Nullable private Boolean readableTimestamp ;
145
+ @ Nullable private Boolean appendLog ;
146
+ @ Nullable private Boolean verbose ;
147
+ @ Nullable private Boolean silent ;
148
+ @ Nullable private String allowedListIps ;
149
+ @ Nullable private ChromiumDriverLogLevel logLevel ;
149
150
150
151
@ Override
151
152
public int score (Capabilities capabilities ) {
@@ -196,7 +197,7 @@ public Builder withBuildCheckDisabled(boolean noBuildCheck) {
196
197
* @param logLevel {@link ChromiumDriverLogLevel} for desired log level output.
197
198
* @return A self reference.
198
199
*/
199
- public Builder withLoglevel (ChromiumDriverLogLevel logLevel ) {
200
+ public Builder withLoglevel (@ Nullable ChromiumDriverLogLevel logLevel ) {
200
201
this .logLevel = logLevel ;
201
202
this .silent = false ;
202
203
this .verbose = false ;
@@ -238,7 +239,7 @@ public Builder withVerbose(boolean verbose) {
238
239
* @param allowedListIps Comma-separated list of remote IPv4 addresses.
239
240
* @return A self reference.
240
241
*/
241
- public Builder withAllowedListIps (String allowedListIps ) {
242
+ public Builder withAllowedListIps (@ Nullable String allowedListIps ) {
242
243
this .allowedListIps = allowedListIps ;
243
244
return this ;
244
245
}
@@ -249,7 +250,7 @@ public Builder withAllowedListIps(String allowedListIps) {
249
250
* @param readableTimestamp Whether the timestamp of the log is readable.
250
251
* @return A self reference.
251
252
*/
252
- public Builder withReadableTimestamp (Boolean readableTimestamp ) {
253
+ public Builder withReadableTimestamp (@ Nullable Boolean readableTimestamp ) {
253
254
this .readableTimestamp = readableTimestamp ;
254
255
return this ;
255
256
}
@@ -321,7 +322,11 @@ protected List<String> createArgs() {
321
322
322
323
@ Override
323
324
protected EdgeDriverService createDriverService (
324
- File exe , int port , Duration timeout , List <String > args , Map <String , String > environment ) {
325
+ @ Nullable File exe ,
326
+ int port ,
327
+ @ Nullable Duration timeout ,
328
+ @ Nullable List <String > args ,
329
+ @ Nullable Map <String , String > environment ) {
325
330
try {
326
331
return new EdgeDriverService (exe , port , timeout , args , environment );
327
332
} catch (IOException e ) {
0 commit comments