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 ;
2122
2223/**
2324 * This filter produces a logical NOT of the filters specified.
@@ -36,13 +37,10 @@ public class NotFileFilter extends AbstractFileFilter implements Serializable {
3637 * Constructs a new file filter that NOTs the result of another filter.
3738 *
3839 * @param filter the filter, must not be null
39- * @throws IllegalArgumentException if the filter is null
40+ * @throws NullPointerException if the filter is null
4041 */
4142 public NotFileFilter (final IOFileFilter filter ) {
42- if (filter == null ) {
43- throw new IllegalArgumentException ("The filter must not be null" );
44- }
45- this .filter = filter ;
43+ this .filter = Objects .requireNonNull (filter , "filter" );
4644 }
4745
4846 /**
You can’t perform that action at this time.
0 commit comments