diff options
author | Simon Rettberg | 2023-12-15 15:51:02 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-12-15 15:51:02 +0100 |
commit | e5045d34bc3d9be25c69c41d33fb70e9735a6807 (patch) | |
tree | 9d78fdc417a14255a326131315740c4206dd0b3c | |
parent | [maven] Use https (diff) | |
download | ecp-client-lean-e5045d34bc3d9be25c69c41d33fb70e9735a6807.tar.gz ecp-client-lean-e5045d34bc3d9be25c69c41d33fb70e9735a6807.tar.xz ecp-client-lean-e5045d34bc3d9be25c69c41d33fb70e9735a6807.zip |
Silence NPE from reset call on certain JVMs
To be debugged, no idea where this is coming from as of now.
A lot of calls seem to be deprecated now, maybe time to refactor this...
-rw-r--r-- | src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticator.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticator.java b/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticator.java index 9422ea6..2d90147 100644 --- a/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticator.java +++ b/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticator.java @@ -134,12 +134,15 @@ public class ECPAuthenticator extends ECPAuthenticatorBase { httpPost.setEntity(new StringEntity(documentToString(idpResponse)));
httpResponse = client.execute(httpPost, ctx);
logger.info("Asserting resulted in " + httpResponse.getReasonPhrase());
- httpPost.reset();
} catch (TransformerException | IOException e) {
logger.debug("Could not post assertion back to SP");
throw new ECPAuthenticationException(e);
}
-
+ try {
+ httpPost.reset();
+ } catch (Exception e) {
+ }
+
logger.info("Requesting original URL");
httpGet = new HttpGet(authInfo.getSpUrl().toString());
try {
|