public static void notNullOrEmpty ( final String string , final String message ) throws IllegalArgumentException { if ( string == null || string . length ( ) == 0 ) { throw new IllegalArgumentException ( message ) ; } }
Checks that the specified String is not null or empty throws exception if it is .