InclusionExclusionFilenameFilter implements java.io.FilenameFilter { @Override public boolean accept( File file, String name ) { if (inclusionPattern == null) { if (exclusionPattern != null && exclusion.matcher(name).matches()) return false; if (extraPropertiesExclusion != null && extraPropertiesExclusion.matcher(name).matches()) return false; return true; } if (!inclusion.matcher(name).matches()) return false; if (exclusionPattern != null && exclusion.matcher(name).matches()) return false; if (extraPropertiesExclusion != null && extraPropertiesExclusion.matcher(name).matches()) return false; return true; }  void setExclusionPattern( String exclusionPattern ); void setExtraPropertiesExclusionPattern( String exclusionPattern ); void setInclusionPattern( String inclusionPattern ); String getExclusionPattern(); String getInclusionPattern(); @Override boolean accept( File file,
                           String name );  }
@Test public void testEmptyFilter() { assertTrue(filter.accept(null, "anystring")); }