summaryrefslogtreecommitdiff
path: root/src/main/java/au/id/zancanaro/javacheck/junit
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-04 16:46:31 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-04 16:46:31 +1000
commitb435b8659eef0e8bc2910966d87b5b74b4cddbe2 (patch)
tree22194a911cf071766d99d7f9c1600889a6147ebb /src/main/java/au/id/zancanaro/javacheck/junit
parent6781ae52a41188e82a0354d4725a7c2718830e45 (diff)
Move stuff over to using streams instead of iterators: much nicer!
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/junit')
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/junit/Properties.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java b/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java
index b0dd2cd..6bba786 100644
--- a/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java
+++ b/src/main/java/au/id/zancanaro/javacheck/junit/Properties.java
@@ -229,8 +229,8 @@ public class Properties extends BlockJUnit4ClassRunner {
Thread shutdownHandler = makeShutdownHandler(smallest, originalEx);
Runtime.getRuntime().addShutdownHook(shutdownHandler);
- Iterator<ShrinkTree<List<Object>>> trees = failed.getChildren();
Set<List<Object>> seenArgs = new HashSet<>();
+ Iterator<ShrinkTree<List<Object>>> trees = failed.getChildren().iterator();
while (trees.hasNext()) {
ShrinkTree<List<Object>> tree = trees.next();
if (seenArgs.add(Arrays.asList(tree.getValue()))) {
@@ -240,7 +240,7 @@ public class Properties extends BlockJUnit4ClassRunner {
// ignore, because it's not useful
} catch (Throwable ex) {
smallest[0] = new ShrinkResult(tree.getValue(), ex);
- Iterator<ShrinkTree<List<Object>>> children = tree.getChildren();
+ Iterator<ShrinkTree<List<Object>>> children = tree.getChildren().iterator();
if (children.hasNext()) {
trees = children;
} else {