boolean (String s, Pattern p) { try { return p.matcher(s).matches(); } catch (Exception e) { LOG.error("Exception matching file name \"" + s + "\" against the pattern \"" + p + "\"", e); return false; } }