File tree 3 files changed +15
-3
lines changed
java/src/org/openqa/selenium
3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 17
17
18
18
package org .openqa .selenium ;
19
19
20
+ import org .jspecify .annotations .NullMarked ;
21
+ import org .jspecify .annotations .Nullable ;
22
+
23
+ @ NullMarked
20
24
public enum PageLoadStrategy {
21
25
NONE ("none" ),
22
26
EAGER ("eager" ),
@@ -33,7 +37,7 @@ public String toString() {
33
37
return String .valueOf (text );
34
38
}
35
39
36
- public static PageLoadStrategy fromString (String text ) {
40
+ public static @ Nullable PageLoadStrategy fromString (@ Nullable String text ) {
37
41
if (text != null ) {
38
42
for (PageLoadStrategy b : PageLoadStrategy .values ()) {
39
43
if (text .equalsIgnoreCase (b .text )) {
Original file line number Diff line number Diff line change 17
17
18
18
package org .openqa .selenium ;
19
19
20
+ import org .jspecify .annotations .NullMarked ;
21
+ import org .jspecify .annotations .Nullable ;
22
+
23
+ @ NullMarked
20
24
public enum UnexpectedAlertBehaviour {
21
25
ACCEPT ("accept" ),
22
26
DISMISS ("dismiss" ),
@@ -35,7 +39,7 @@ public String toString() {
35
39
return String .valueOf (text );
36
40
}
37
41
38
- public static UnexpectedAlertBehaviour fromString (String text ) {
42
+ public static @ Nullable UnexpectedAlertBehaviour fromString (@ Nullable String text ) {
39
43
if (text != null ) {
40
44
for (UnexpectedAlertBehaviour b : UnexpectedAlertBehaviour .values ()) {
41
45
if (text .equalsIgnoreCase (b .text )) {
Original file line number Diff line number Diff line change 17
17
18
18
package org .openqa .selenium ;
19
19
20
+ import org .jspecify .annotations .NullMarked ;
21
+ import org .jspecify .annotations .Nullable ;
22
+
20
23
/** Represents the type of new browser window that may be created. */
24
+ @ NullMarked
21
25
public enum WindowType {
22
26
WINDOW ("window" ),
23
27
TAB ("tab" ),
@@ -34,7 +38,7 @@ public String toString() {
34
38
return String .valueOf (text );
35
39
}
36
40
37
- public static WindowType fromString (String text ) {
41
+ public static @ Nullable WindowType fromString (@ Nullable String text ) {
38
42
if (text != null ) {
39
43
for (WindowType b : WindowType .values ()) {
40
44
if (text .equalsIgnoreCase (b .text )) {
You can’t perform that action at this time.
0 commit comments