MCPcopy Create free account
hub / github.com/apache/commons-lang / notNull

Method notNull

src/main/java/org/apache/commons/lang3/Validate.java:1042–1045  ·  view source on GitHub ↗

Validate that the specified argument is not null; otherwise throwing an exception. Validate.notNull(myObject, "The object must not be null"); The message of the exception is "The validated object is null". @param The object type. @param object the object to ch

(final T object)

Source from the content-addressed store, hash-verified

1040 * @deprecated Use {@link Objects#requireNonNull(Object)}.
1041 */
1042 @Deprecated
1043 public static <T> T notNull(final T object) {
1044 return notNull(object, DEFAULT_IS_NULL_EX_MESSAGE);
1045 }
1046
1047 /**
1048 * Validate that the specified argument is not {@code null};

Calls 2

toSupplierMethod · 0.95
requireNonNullMethod · 0.45