We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 708513e + 033eee2 commit 789ba37Copy full SHA for 789ba37
src/main/org/apache/tools/ant/types/ResourceCollection.java
@@ -14,6 +14,7 @@
14
package org.apache.tools.ant.types;
15
16
import java.util.stream.Stream;
17
+import java.util.stream.StreamSupport;
18
19
/**
20
* Interface describing a collection of Resources.
@@ -46,9 +47,7 @@ public interface ResourceCollection extends Iterable<Resource> {
46
47
* @since Ant 1.10.2
48
*/
49
default Stream<? extends Resource> stream() {
- final Stream.Builder<Resource> b = Stream.builder();
50
- forEach(b);
51
- return b.build();
+ return StreamSupport.stream(spliterator(), false);
52
}
53
54
0 commit comments