Details
Description
ThrowExceptionProcessor uses this line of code to retrieve the constructor of an Exception class:
Constructor<?> constructor = type.getDeclaredConstructor(String.class);
The problem is that this will only find constructors defined in the actual class itself, not in its superclasses. This forces users to unnecessarily implement a constructor that excepts a String in their custom exception classes.
Easy fix, use the following method:
Constructor<?> constructor = type.getConstructor(String.class);
Will fix and create a PR.
Attachments
Issue Links
- links to