jakartaee / authentication

Jakarta Authentication
https://eclipse.org/ee4j/jaspic
Other
24 stars 33 forks source link

Add constructor variants taking cause to AuthException. #132

Closed arjantijms closed 2 years ago

arjantijms commented 3 years ago

AuthException originates from the ancient time in Java when the cause wasn't universally set on an exception.

Currently verbose looking code is needed to set this:

throw (AuthException) new AuthException().initCause(e);

We should add two constructor variants that take a cause object, so we can just do:

throw new AuthException(e);