summaryrefslogtreecommitdiff
path: root/src/main/java/au/id/zancanaro/javacheck/object
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-07-06 22:46:02 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-07-06 22:46:02 +1000
commita7b074875f241d98877de51a93717d56cf2d19e4 (patch)
tree7b5397d3955cbe6bc6a6a2669f9191b657e48591 /src/main/java/au/id/zancanaro/javacheck/object
parent2348f721ba7475b65afeefb108012c564e5653ce (diff)
Fix the warnings from the previous commit
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/object')
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerationException.java2
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/object/ObjectGenerator.java4
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/object/UseGenerator.java2
3 files changed, 5 insertions, 3 deletions
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<T> implements Generator<T> {
@Override
public ShrinkTree<T> 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<? extends Generator> value();
+ Class<? extends Generator<?>> value();
}