diff options
author | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-04 16:46:31 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-04 16:46:31 +1000 |
commit | b435b8659eef0e8bc2910966d87b5b74b4cddbe2 (patch) | |
tree | 22194a911cf071766d99d7f9c1600889a6147ebb /src/main/java/au/id/zancanaro/javacheck/junit | |
parent | 6781ae52a41188e82a0354d4725a7c2718830e45 (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.java | 4 |
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 { |