Skip to content

Commit cb55c57

Browse files
author
Gary Gregory
committed
Revert "Use stock JRE null checking Objects.requireNonNull()."
This reverts commit d0cd953.
1 parent d0cd953 commit cb55c57

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/java/org/apache/commons/io/filefilter/NotFileFilter.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import java.io.File;
2020
import 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
/**

0 commit comments

Comments
 (0)