catch(PatternSyntaxException ex) {
// Todo: let the user know the regexp is invalid
LOGGER.debug("Invalid regexp", ex);
// This filter does match any file
filter = new PassThroughFileFilter(false);
}
break;
}
// If folders are excluded, add a regular file filter and chain it with an AndFileFilter