question: private List < String > assertNotBlankAndTrim ( List < String > list , String displayName ) { List < String > trimmed = null ; if ( list != null ) { for ( String string : list ) { Assert . hasText ( string , displayName + " must not be blank" ) ; } trimmed = new ArrayList < > ( ) ; for ( String string : list ) { trimmed . add ( string . trim ( ) ) ; } } return trimmed ; }
target:  Asserts that the given list of string contains no blank string and returns a copy of the list with all the values trimmed. If the given list is null, a null is returned.