diff --git a/jqwik/src/main/java/com/github/simy4/coregex/jqwik/CoregexArbitraryProvider.java b/jqwik/src/main/java/com/github/simy4/coregex/jqwik/CoregexArbitraryProvider.java index 43ce8fa..63b4174 100644 --- a/jqwik/src/main/java/com/github/simy4/coregex/jqwik/CoregexArbitraryProvider.java +++ b/jqwik/src/main/java/com/github/simy4/coregex/jqwik/CoregexArbitraryProvider.java @@ -28,8 +28,7 @@ public class CoregexArbitraryProvider implements ArbitraryProvider { @Override public boolean canProvideFor(TypeUsage targetType) { - return targetType.isAssignableFrom(String.class) - && targetType.findAnnotation(Regex.class).isPresent(); + return targetType.isAssignableFrom(String.class) && targetType.isAnnotated(Regex.class); } @Override