spring-framework / org.springframework.util / Assert / isNull

isNull

open static fun isNull(@Nullable object: Any, message: String): Unit

Assert that an object is null.

Assert.isNull(value, "The value must be null");

Parameters

object - the object to check

message - the exception message to use if the assertion fails

Exceptions

IllegalArgumentException - if the object is not null

open static fun isNull(@Nullable object: Any, messageSupplier: Supplier<String>): Unit

Assert that an object is null.

 Assert.isNull(value, () -> "The value '" + value + "' must be null"); 

Parameters

object - the object to check

messageSupplier - a supplier for the exception message to use if the assertion fails

Exceptions

IllegalArgumentException - if the object is not null

Since
5.0

open static fun isNull(@Nullable object: Any): Unit