Skip to content

Commit 1a365c1

Browse files
committed
fix(annotations): narrow exception scope in SiftMatchValidator
1 parent 97df9eb commit 1a365c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sift-annotations/src/main/java/com/mirkoddd/sift/annotations/SiftMatchValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void initialize(SiftMatch constraintAnnotation) {
4646
}
4747

4848
this.compiledPattern = Pattern.compile(rawRegex, combinedFlags);
49-
} catch (Exception e) {
49+
} catch (ReflectiveOperationException e) {
5050
throw new ValidationException("Failed to initialize SiftRegexProvider: " + constraintAnnotation.value().getName() + ". Ensure it has a public no-args constructor.", e);
5151
}
5252
}

0 commit comments

Comments
 (0)