diff options
author | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-09 23:58:41 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@zancanaro.id.au> | 2015-06-09 23:58:41 +1000 |
commit | 6546881559e4bbcfe2b220199a9f3cd4196d1960 (patch) | |
tree | 16244beed46eff76b65d1e5304cae4591b7db7ee /src/main/java/au/id/zancanaro/javacheck/Generator.java | |
parent | 40961d4950c40643d5d71721a7e024e3951323ce (diff) |
A few changes, as suggested by static analysis
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/Generator.java')
-rw-r--r-- | src/main/java/au/id/zancanaro/javacheck/Generator.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/au/id/zancanaro/javacheck/Generator.java b/src/main/java/au/id/zancanaro/javacheck/Generator.java index ec7a16e..8642e8b 100644 --- a/src/main/java/au/id/zancanaro/javacheck/Generator.java +++ b/src/main/java/au/id/zancanaro/javacheck/Generator.java @@ -71,7 +71,7 @@ public interface Generator<T> { ShrinkTree<T>[] result = (ShrinkTree<T>[]) new ShrinkTree[generators.length]; int index = 0; for (Generator<? extends T> generator : generators) { - result[index++] = generator.generate(random, size).map(x -> (T) x); + result[index++] = generator.generate(random, size).map(Function.identity()); } return ShrinkTree.combine(result, ShrinkTree::promoteChildren); }; |