From b435b8659eef0e8bc2910966d87b5b74b4cddbe2 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 4 Jun 2015 16:46:31 +1000 Subject: Move stuff over to using streams instead of iterators: much nicer! --- src/main/java/au/id/zancanaro/javacheck/junit/Properties.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/au/id/zancanaro/javacheck/junit/Properties.java') 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>> trees = failed.getChildren(); Set> seenArgs = new HashSet<>(); + Iterator>> trees = failed.getChildren().iterator(); while (trees.hasNext()) { ShrinkTree> 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>> children = tree.getChildren(); + Iterator>> children = tree.getChildren().iterator(); if (children.hasNext()) { trees = children; } else { -- cgit v1.2.3