diff --git a/java/src/org/openqa/selenium/interactions/Coordinates.java b/java/src/org/openqa/selenium/interactions/Coordinates.java index dc6780d98efa7..e723cd60a28e1 100644 --- a/java/src/org/openqa/selenium/interactions/Coordinates.java +++ b/java/src/org/openqa/selenium/interactions/Coordinates.java @@ -17,12 +17,14 @@ package org.openqa.selenium.interactions; +import org.jspecify.annotations.NullMarked; import org.openqa.selenium.Point; /** * Provides coordinates of an element for advanced interactions. Note that some coordinates (such as * screen coordinates) are evaluated lazily since the element may have to be scrolled into view. */ +@NullMarked public interface Coordinates { /** diff --git a/java/src/org/openqa/selenium/interactions/Interactive.java b/java/src/org/openqa/selenium/interactions/Interactive.java index c47e0fc1ab4d0..df6b39feee4f9 100644 --- a/java/src/org/openqa/selenium/interactions/Interactive.java +++ b/java/src/org/openqa/selenium/interactions/Interactive.java @@ -18,11 +18,13 @@ package org.openqa.selenium.interactions; import java.util.Collection; +import org.jspecify.annotations.NullMarked; /** * Indicates that a class can be used with the W3C WebDriver Actions commands. */ +@NullMarked public interface Interactive { void perform(Collection actions); diff --git a/java/src/org/openqa/selenium/interactions/SourceType.java b/java/src/org/openqa/selenium/interactions/SourceType.java index 973c732797511..d69d12db1d42c 100644 --- a/java/src/org/openqa/selenium/interactions/SourceType.java +++ b/java/src/org/openqa/selenium/interactions/SourceType.java @@ -17,20 +17,24 @@ package org.openqa.selenium.interactions; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + /** One of the allowing types for an {@link InputSource}. */ +@NullMarked public enum SourceType { KEY("key"), NONE(null), POINTER("pointer"), WHEEL("wheel"); - private final String type; + private final @Nullable String type; - SourceType(String type) { + SourceType(@Nullable String type) { this.type = type; } - public String getType() { + public @Nullable String getType() { return type; } }