private void add( List<String> elems, String one ) { for( String sub : one.split( deRegexSep ) ) { ec.filenameIsNotValidBecause( sub ). ifPresent( reason -> { throw u( new InvalidPathException( sub, reason ));} ); // if( !ec.isFilenameValid( sub, reason ) ) { // throw new InvalidPathException( sub, reason.get() ); // } // ec.findIllegalChars( sub ). // ifPresent( ch -> { // throw new InvalidPathException( sub, "contains illegal char <" + ch + ">");}); if( !sub.isEmpty() ) { elems.add( sub ); //trans.apply( sub )); } } }