public static List < String > asList ( String text ) { if ( StringUtils . isBlank ( text ) ) { return Collections . emptyList ( ) ; } else { try { return IOUtils . readLines ( new StringReader ( text ) ) ; } catch ( IOException e ) { throw new RuntimeException ( "Cannot get lines" , e ) ; } } }
Splits a text in several lines .