File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/io/filefilter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919import java .io .File ;
2020import java .io .Serializable ;
21- import java .util .Objects ;
2221
2322/**
2423 * This filter produces a logical NOT of the filters specified.
@@ -37,10 +36,13 @@ public class NotFileFilter extends AbstractFileFilter implements Serializable {
3736 * Constructs a new file filter that NOTs the result of another filter.
3837 *
3938 * @param filter the filter, must not be null
40- * @throws NullPointerException if the filter is null
39+ * @throws IllegalArgumentException if the filter is null
4140 */
4241 public NotFileFilter (final IOFileFilter filter ) {
43- this .filter = Objects .requireNonNull (filter , "filter" );
42+ if (filter == null ) {
43+ throw new IllegalArgumentException ("The filter must not be null" );
44+ }
45+ this .filter = filter ;
4446 }
4547
4648 /**
You can’t perform that action at this time.
0 commit comments