summaryrefslogtreecommitdiff
path: root/src/main/java/au/id/zancanaro/javacheck/object
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/object')
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/object/CharType.java2
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/object/GeneratorProvider.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/au/id/zancanaro/javacheck/object/CharType.java b/src/main/java/au/id/zancanaro/javacheck/object/CharType.java
index aa3049e..b53d211 100644
--- a/src/main/java/au/id/zancanaro/javacheck/object/CharType.java
+++ b/src/main/java/au/id/zancanaro/javacheck/object/CharType.java
@@ -10,6 +10,6 @@ import java.lang.annotation.Target;
public @interface CharType {
public static enum TYPE {
ALL, ASCII, ALPHA, ALPHA_NUMERIC
- };
+ }
TYPE value();
}
diff --git a/src/main/java/au/id/zancanaro/javacheck/object/GeneratorProvider.java b/src/main/java/au/id/zancanaro/javacheck/object/GeneratorProvider.java
index 67769b6..24b73d5 100644
--- a/src/main/java/au/id/zancanaro/javacheck/object/GeneratorProvider.java
+++ b/src/main/java/au/id/zancanaro/javacheck/object/GeneratorProvider.java
@@ -83,9 +83,10 @@ public interface GeneratorProvider {
provider));
} else if (type == Map.class) {
TypeVariable<?>[] params = Map.class.getTypeParameters();
+ TypeVariable<?> keyType = params[0], valueType = params[1];
return mapOf(
- provider.getGenerator(params[0], new Annotation[0], provider),
- provider.getGenerator(params[1], new Annotation[0], provider));
+ provider.getGenerator(keyType, new Annotation[0], provider),
+ provider.getGenerator(valueType, new Annotation[0], provider));
} else if (type instanceof Class) {
return ofType((Class<?>) type, provider);
} else if (type instanceof ParameterizedType) {