private Iterable < Path > getPathEntries ( String searchPath , Path emptyPathDefault ) { ListBuffer < Path > entries = new ListBuffer <> ( ) ; for ( String s : searchPath . split ( Pattern . quote ( File . pathSeparator ) , - 1 ) ) { if ( s . isEmpty ( ) ) { if ( emptyPathDefault != null ) { entries . add ( emptyPathDefault ) ; } } else { try { entries . add ( getPath ( s ) ) ; } catch ( IllegalArgumentException e ) { if ( warn ) { log . warning ( LintCategory . PATH , "invalid.path" , s ) ; } } } } return entries ; }
Split a search path into its elements . If emptyPathDefault is not null all empty elements in the path including empty elements at either end of the path will be replaced with the value of emptyPathDefault .