public static void assertNotNull(Object o) { assertNotNull( o, MESSAGES.mustNotBeNull() ); }
/** * Asserts that the given object is not {@code null}. * * @param o The object to check. * @param name The name of the value to check. A message of the form * "<name> must not be null" will be used as message of * the resulting exception if the given object is {@code null}. * * @throws IllegalArgumentException In case the given object is {@code null}. */ public static void assertValueNotNull(Object o, String name) { if ( o == null ) { throw log.getIllegalArgumentException( MESSAGES.mustNotBeNull( name ) ); } }
public static void assertNotNull(Object o) { assertNotNull( o, MESSAGES.mustNotBeNull() ); }
/** * Asserts that the given object is not {@code null}. * * @param o The object to check. * @param name The name of the value to check. A message of the form * "<name> must not be null" will be used as message of * the resulting exception if the given object is {@code null}. * * @throws IllegalArgumentException In case the given object is {@code null}. */ public static void assertValueNotNull(Object o, String name) { if ( o == null ) { throw LOG.getIllegalArgumentException( MESSAGES.mustNotBeNull( name ) ); } }