File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
src/main/java/io/github/computerdaddyguy/jfiletreeprettyprinter Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1414import java .util .regex .Pattern ;
1515import java .util .stream .Stream ;
1616import org .jspecify .annotations .NullMarked ;
17- import org .jspecify .annotations .Nullable ;
1817
1918/**
2019 * Utility class providing factory and composition methods for {@link PathMatcher}s.
@@ -193,15 +192,13 @@ public static PathMatcher anyOf(Iterable<PathMatcher> matchers) {
193192 return combineMatchers (matchers , Mode .ANY );
194193 }
195194
196- private static List <PathMatcher > buildSafeList (PathMatcher matcher , @ Nullable PathMatcher ... matchers ) {
195+ private static List <PathMatcher > buildSafeList (PathMatcher matcher , PathMatcher ... matchers ) {
197196 Objects .requireNonNull (matcher , "matcher is null" );
198- var list = new ArrayList <PathMatcher >(1 + ( matchers == null ? 0 : matchers .length ) );
197+ var list = new ArrayList <PathMatcher >(1 + matchers .length );
199198 list .add (matcher );
200- if (matchers != null ) {
201- for (PathMatcher m : matchers ) {
202- Objects .requireNonNull (m , "some matcher is null" );
203- list .add (m );
204- }
199+ for (PathMatcher m : matchers ) {
200+ Objects .requireNonNull (m , "some matcher is null" );
201+ list .add (m );
205202 }
206203 return List .copyOf (list );
207204 }
You can’t perform that action at this time.
0 commit comments