@Test @SuppressWarnings("MustBeClosedChecker") void shouldIterateResourcesOnFileSystemAndInJars() throws Exception { List<URL> all = Resources.find("net/consensys/cava/io/file/resourceresolvertest*.txt").collect(Collectors.toList()); assertEquals(6, txtFiles.size(), () -> describeExpectation(6, txtFiles)); List<URL> txtFilesFromRoot = Resources.find("test?.txt").collect(Collectors.toList()); assertEquals(5, txtFilesFromRoot.size(), () -> describeExpectation(5, txtFilesFromRoot)); List<URL> txtFilesFromRoot2 = Resources.find("/test*.txt").collect(Collectors.toList()); assertEquals(6, txtFilesFromRoot2.size(), () -> describeExpectation(6, txtFilesFromRoot2)); List<URL> txtFilesFromRoot3 = Resources.find(" assertEquals(6, txtFilesFromRoot3.size(), () -> describeExpectation(6, txtFilesFromRoot3)); List<URL> txtFilesInDir = Resources.find("**/anotherdir/*.txt").collect(Collectors.toList()); assertEquals(1, txtFilesInDir.size(), () -> describeExpectation(1, txtFilesInDir)); }
@MustBeClosed public static Stream<URL> find(String glob) throws IOException { return find(Defaults.CLASSLOADER, glob); }
Resources { @MustBeClosed public static Stream<URL> find(String glob) throws IOException { return find(Defaults.CLASSLOADER, glob); } }
Resources { @MustBeClosed public static Stream<URL> find(String glob) throws IOException { return find(Defaults.CLASSLOADER, glob); } private  Resources(); }
Resources { @MustBeClosed public static Stream<URL> find(String glob) throws IOException { return find(Defaults.CLASSLOADER, glob); } private  Resources(); @MustBeClosed static Stream<URL> find(String glob); @MustBeClosed @SuppressWarnings("MustBeClosedChecker") static Stream<URL> find(@Nullable ClassLoader classLoader, String glob); }
Resources { @MustBeClosed public static Stream<URL> find(String glob) throws IOException { return find(Defaults.CLASSLOADER, glob); } private  Resources(); @MustBeClosed static Stream<URL> find(String glob); @MustBeClosed @SuppressWarnings("MustBeClosedChecker") static Stream<URL> find(@Nullable ClassLoader classLoader, String glob);  }