30
30
import java .util .List ;
31
31
import java .util .Locale ;
32
32
import java .util .Map ;
33
+ import org .jspecify .annotations .Nullable ;
33
34
import org .openqa .selenium .Capabilities ;
34
35
import org .openqa .selenium .WebDriverException ;
35
36
import org .openqa .selenium .remote .service .DriverFinder ;
@@ -78,11 +79,11 @@ public class InternetExplorerDriverService extends DriverService {
78
79
* @throws IOException If an I/O error occurs.
79
80
*/
80
81
public InternetExplorerDriverService (
81
- File executable ,
82
+ @ Nullable File executable ,
82
83
int port ,
83
- Duration timeout ,
84
- List <String > args ,
85
- Map <String , String > environment )
84
+ @ Nullable Duration timeout ,
85
+ @ Nullable List <String > args ,
86
+ @ Nullable Map <String , String > environment )
86
87
throws IOException {
87
88
super (
88
89
executable ,
@@ -128,10 +129,10 @@ public static class Builder
128
129
extends DriverService .Builder <
129
130
InternetExplorerDriverService , InternetExplorerDriverService .Builder > {
130
131
131
- private InternetExplorerDriverLogLevel logLevel ;
132
- private String host = null ;
133
- private File extractPath = null ;
134
- private Boolean silent = null ;
132
+ private @ Nullable InternetExplorerDriverLogLevel logLevel ;
133
+ private @ Nullable String host = null ;
134
+ private @ Nullable File extractPath = null ;
135
+ private @ Nullable Boolean silent = null ;
135
136
136
137
@ Override
137
138
public int score (Capabilities capabilities ) {
@@ -154,7 +155,7 @@ public int score(Capabilities capabilities) {
154
155
* @param logLevel A level of the log verbosity.
155
156
* @return A self reference.
156
157
*/
157
- public Builder withLogLevel (InternetExplorerDriverLogLevel logLevel ) {
158
+ public Builder withLogLevel (@ Nullable InternetExplorerDriverLogLevel logLevel ) {
158
159
this .logLevel = logLevel ;
159
160
return this ;
160
161
}
@@ -165,7 +166,7 @@ public Builder withLogLevel(InternetExplorerDriverLogLevel logLevel) {
165
166
* @param host A host name.
166
167
* @return A self reference.
167
168
*/
168
- public Builder withHost (String host ) {
169
+ public Builder withHost (@ Nullable String host ) {
169
170
this .host = host ;
170
171
return this ;
171
172
}
@@ -176,7 +177,7 @@ public Builder withHost(String host) {
176
177
* @param extractPath A path.
177
178
* @return A self reference.
178
179
*/
179
- public Builder withExtractPath (File extractPath ) {
180
+ public Builder withExtractPath (@ Nullable File extractPath ) {
180
181
this .extractPath = extractPath ;
181
182
return this ;
182
183
}
@@ -187,7 +188,7 @@ public Builder withExtractPath(File extractPath) {
187
188
* @param silent To be silent in stdout or not.
188
189
* @return A self reference.
189
190
*/
190
- public Builder withSilent (Boolean silent ) {
191
+ public Builder withSilent (@ Nullable Boolean silent ) {
191
192
this .silent = silent ;
192
193
return this ;
193
194
}
@@ -244,7 +245,11 @@ protected List<String> createArgs() {
244
245
245
246
@ Override
246
247
protected InternetExplorerDriverService createDriverService (
247
- File exe , int port , Duration timeout , List <String > args , Map <String , String > environment ) {
248
+ @ Nullable File exe ,
249
+ int port ,
250
+ @ Nullable Duration timeout ,
251
+ @ Nullable List <String > args ,
252
+ @ Nullable Map <String , String > environment ) {
248
253
try {
249
254
return new InternetExplorerDriverService (exe , port , timeout , args , environment );
250
255
} catch (IOException e ) {
0 commit comments