public static void notEmpty ( String value , String message ) throws IllegalArgumentException { if ( value == null || "" . equals ( value . trim ( ) ) ) { throw new IllegalArgumentException ( "A precondition failed: " + message ) ; } }
Checks that a string is not null or empty .