diff --git a/java/src/org/openqa/selenium/interactions/CompositeAction.java b/java/src/org/openqa/selenium/interactions/CompositeAction.java index 1b9b47fe94680..7005a460a931c 100644 --- a/java/src/org/openqa/selenium/interactions/CompositeAction.java +++ b/java/src/org/openqa/selenium/interactions/CompositeAction.java @@ -19,9 +19,11 @@ import java.util.ArrayList; import java.util.List; +import org.jspecify.annotations.NullMarked; import org.openqa.selenium.internal.Require; /** An action for aggregating actions and triggering all of them at the same time. */ +@NullMarked public class CompositeAction implements Action { private final List actionsList = new ArrayList<>(); diff --git a/java/src/org/openqa/selenium/interactions/Interaction.java b/java/src/org/openqa/selenium/interactions/Interaction.java index 789ebf91e86c4..bc16e51e125e9 100644 --- a/java/src/org/openqa/selenium/interactions/Interaction.java +++ b/java/src/org/openqa/selenium/interactions/Interaction.java @@ -17,10 +17,13 @@ package org.openqa.selenium.interactions; +import org.jspecify.annotations.NullMarked; + /** * Used as the basis of {@link Sequence}s for the W3C WebDriver spec Action commands. */ +@NullMarked public abstract class Interaction { private final InputSource source; diff --git a/java/src/org/openqa/selenium/interactions/Locatable.java b/java/src/org/openqa/selenium/interactions/Locatable.java index de31c0a14c50e..e0360b4e1fa1a 100644 --- a/java/src/org/openqa/selenium/interactions/Locatable.java +++ b/java/src/org/openqa/selenium/interactions/Locatable.java @@ -17,6 +17,9 @@ package org.openqa.selenium.interactions; +import org.jspecify.annotations.NullMarked; + +@NullMarked public interface Locatable { Coordinates getCoordinates(); } diff --git a/java/src/org/openqa/selenium/interactions/MoveTargetOutOfBoundsException.java b/java/src/org/openqa/selenium/interactions/MoveTargetOutOfBoundsException.java index 6bfab3f23a0d0..36e44703a1f71 100644 --- a/java/src/org/openqa/selenium/interactions/MoveTargetOutOfBoundsException.java +++ b/java/src/org/openqa/selenium/interactions/MoveTargetOutOfBoundsException.java @@ -17,22 +17,25 @@ package org.openqa.selenium.interactions; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; import org.openqa.selenium.WebDriverException; /** * Indicates that the target provided to the actions move() method is invalid - outside of the size * of the window. */ +@NullMarked public class MoveTargetOutOfBoundsException extends WebDriverException { - public MoveTargetOutOfBoundsException(String message) { + public MoveTargetOutOfBoundsException(@Nullable String message) { super(message); } - public MoveTargetOutOfBoundsException(Throwable cause) { + public MoveTargetOutOfBoundsException(@Nullable Throwable cause) { super(cause); } - public MoveTargetOutOfBoundsException(String message, Throwable cause) { + public MoveTargetOutOfBoundsException(@Nullable String message, @Nullable Throwable cause) { super(message, cause); } }