diff --git a/java/src/org/openqa/selenium/internal/Require.java b/java/src/org/openqa/selenium/internal/Require.java index 64c75432b1d89..d728a00d447c6 100644 --- a/java/src/org/openqa/selenium/internal/Require.java +++ b/java/src/org/openqa/selenium/internal/Require.java @@ -138,6 +138,9 @@ public static int positive(String argName, Integer number, String message) { } public static double positive(String argName, Double number, String message) { + if (number == null) { + throw new IllegalArgumentException(String.format(MUST_BE_SET, argName)); + } if (number <= 0) { if (message == null) { throw new IllegalArgumentException(String.format(MUST_BE_POSITIVE, argName));