Allow BadJWTException to be reusable
Issue #269
duplicate
Some classes like com.nimbusds.oauth2.sdk.assertions.jwt.JWTAssertionDetailsVerifier are caching BadJWTException in order to reuse them.
To do that, reusable instances should have a null cause, should disable suppression and should not allow stack trace to be filled in.
This is currently not possible for a BadJWTException (which means that JWTAssertionDetailsVerifier has a memory leak if validation is done in a try with resource that has an exception in the closing of th resource).
Comments (2)
-
-
- changed status to duplicate
Duplicate of
#229. - Log in to comment
Thanks for the feedback. I have the feeling the exception caching will need a more substantial review, of whether it's actually worth it.