@@ -65,7 +65,7 @@ protected Path uriToPath(URI uri) {
6565
6666 /**
6767 * Invoked by FileSystems.newFileSystem, Only returns a value if env contains one of more of:
68- * "filter": BiPredicate<String, String> - A filter to apply to the opened path
68+ * "filter": UnionPathFilter - A filter to apply to the opened path
6969 * "additional": List<Path> - Additional paths to join together
7070 * If none specified, throws IllegalArgumentException
7171 * If uri.getScheme() is not "union" throws IllegalArgumentException
@@ -76,7 +76,7 @@ public FileSystem newFileSystem(final URI uri, final Map<String, ?> env) throws
7676 @ SuppressWarnings ("unchecked" )
7777 var additional = ((Map <String , List <Path >>)env ).getOrDefault ("additional" , List .<Path >of ());
7878 @ SuppressWarnings ("unchecked" )
79- var filter = ((Map <String , BiPredicate < String , String > >)env ).getOrDefault ("filter" , null );
79+ var filter = ((Map <String , UnionPathFilter >)env ).getOrDefault ("filter" , null );
8080
8181 if (filter == null && additional .isEmpty ())
8282 throw new IllegalArgumentException ("Missing additional and/or filter" );
@@ -95,7 +95,7 @@ public FileSystem newFileSystem(final URI uri, final Map<String, ?> env) throws
9595
9696 /**
9797 * Invoked by FileSystems.newFileSystem, Only returns a value if env contains one of more of:
98- * "filter": BiPredicate<String, String> - A filter to apply to the opened path
98+ * "filter": UnionPathFilter - A filter to apply to the opened path
9999 * "additional": List<Path> - Additional paths to join together
100100 * If none specified, throws UnsupportedOperationException instead of IllegalArgumentException
101101 * so that FileSystems.newFileSystem will search for the next provider.
@@ -106,7 +106,7 @@ public FileSystem newFileSystem(final Path path, final Map<String, ?> env) throw
106106 @ SuppressWarnings ("unchecked" )
107107 var additional = ((Map <String , List <Path >>)env ).getOrDefault ("additional" , List .<Path >of ());
108108 @ SuppressWarnings ("unchecked" )
109- var filter = ((Map <String , BiPredicate < String , String > >)env ).getOrDefault ("filter" , null );
109+ var filter = ((Map <String , UnionPathFilter >)env ).getOrDefault ("filter" , null );
110110
111111 if (filter == null && additional .isEmpty ())
112112 throw new UnsupportedOperationException ("Missing additional and/or filter" );
@@ -119,13 +119,13 @@ public FileSystem newFileSystem(final Path path, final Map<String, ?> env) throw
119119 }
120120 }
121121
122- public UnionFileSystem newFileSystem (@ Nullable BiPredicate < String , String > pathfilter , final Path ... paths ) {
122+ public UnionFileSystem newFileSystem (@ Nullable UnionPathFilter pathfilter , final Path ... paths ) {
123123 if (paths .length == 0 ) throw new IllegalArgumentException ("Need at least one path" );
124124 var key = makeKey (paths [0 ]);
125125 return newFileSystemInternal (key , pathfilter , paths );
126126 }
127127
128- private UnionFileSystem newFileSystemInternal (final String key , @ Nullable BiPredicate < String , String > pathfilter , final Path ... paths ) {
128+ private UnionFileSystem newFileSystemInternal (final String key , @ Nullable UnionPathFilter pathfilter , final Path ... paths ) {
129129 var normpaths = Arrays .stream (paths )
130130 .map (Path ::toAbsolutePath )
131131 .map (Path ::normalize )
0 commit comments