From a7b074875f241d98877de51a93717d56cf2d19e4 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 6 Jul 2015 22:46:02 +1000 Subject: Fix the warnings from the previous commit --- .../au/id/zancanaro/javacheck/object/ObjectGenerationException.java | 2 ++ src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerator.java | 4 ++-- src/main/java/au/id/zancanaro/javacheck/object/UseGenerator.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/au/id/zancanaro/javacheck/object') diff --git a/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerationException.java b/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerationException.java index 444de32..3006e78 100644 --- a/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerationException.java +++ b/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerationException.java @@ -1,6 +1,8 @@ package au.id.zancanaro.javacheck.object; public class ObjectGenerationException extends RuntimeException { + private static final long serialVersionUID = 1L; + public ObjectGenerationException(String message) { super(message); } diff --git a/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerator.java b/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerator.java index a31d990..f518a56 100644 --- a/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerator.java +++ b/src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerator.java @@ -77,9 +77,9 @@ public class ObjectGenerator implements Generator { @Override public ShrinkTree generate(Random random, int size) { - Generator[] parameters = new Generator[constructorGenerators.size()]; + Generator[] parameters = new Generator[constructorGenerators.size()]; parameters = constructorGenerators.toArray(parameters); - Generator[] fields = new Generator[fieldGenerators.size()]; + Generator[] fields = new Generator[fieldGenerators.size()]; fields = fieldGenerators.values().toArray(fields); return Generator.tuple(Generator.tuple(parameters), Generator.tuple(fields)) .generate(random, size) diff --git a/src/main/java/au/id/zancanaro/javacheck/object/UseGenerator.java b/src/main/java/au/id/zancanaro/javacheck/object/UseGenerator.java index f62d978..188416f 100644 --- a/src/main/java/au/id/zancanaro/javacheck/object/UseGenerator.java +++ b/src/main/java/au/id/zancanaro/javacheck/object/UseGenerator.java @@ -10,5 +10,5 @@ import java.lang.annotation.Target; @Target({ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface UseGenerator { - Class value(); + Class> value(); } -- cgit v1.2.3