Updated IllegalArgumentException to NullPointerException for Null Values in Require Class
* Update Require.java
Update IllegealStateException to NullPointerException as the exception misleads in debugging.
* Update Require.java
* Update Require.java
* Update 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));
