diff --git a/hamcrest/src/main/java/org/hamcrest/exception/ThrowsException.java b/hamcrest/src/main/java/org/hamcrest/exception/ThrowsException.java index 7fefec6d..6090922f 100644 --- a/hamcrest/src/main/java/org/hamcrest/exception/ThrowsException.java +++ b/hamcrest/src/main/java/org/hamcrest/exception/ThrowsException.java @@ -32,7 +32,7 @@ public static ThrowsException throwsException() { return new ThrowsException<>(instanceOf(Throwable.class)); } - public static ThrowsException throwsException(T item) { + public static ThrowsException throwsException(V item) { return new ThrowsException<>(exceptionEqualTo(item)); } @@ -40,15 +40,15 @@ public static ThrowsException throwsException(Matcher(exceptionMatcher); } - public static ThrowsException throwsException(Class item) { + public static ThrowsException throwsException(Class item) { return new ThrowsException<>(instanceOf(item)); } - public static ThrowsException throwsException(Class item , String message) { + public static ThrowsException throwsException(Class item , String message) { return new ThrowsException<>(allOf(instanceOf(item), withMessage(message))); } - public static ThrowsException throwsException(Class item , Matcher exceptionMatcher) { + public static ThrowsException throwsException(Class item , Matcher exceptionMatcher) { return new ThrowsException<>(allOf(instanceOf(item), exceptionMatcher)); }