From e5045d34bc3d9be25c69c41d33fb70e9735a6807 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 15 Dec 2023 15:51:02 +0100 Subject: 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... --- src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticator.java | 7 +++++-- 1 file 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 { -- cgit v1.2.3-55-g7522