private void add( final List<String> arguments,
                      final String argument )
    {
        if( argument != null && argument.trim().length() > 0 )
        {
            arguments.add( argument );
        }
    }
private void add ( final List < String > arguments , final String argument ) { if ( argument != null && argument . trim ( ) . length ( ) > 0 ) { arguments . add ( argument ) ; } }
Adds an argumentto a list of arguments by skipping null or empty arguments.

@param arguments list to which the arguments should be added
@param argument  argument to be added (can be null or empty)