summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-12-15 15:51:02 +0100
committerSimon Rettberg2023-12-15 15:51:02 +0100
commite5045d34bc3d9be25c69c41d33fb70e9735a6807 (patch)
tree9d78fdc417a14255a326131315740c4206dd0b3c
parent[maven] Use https (diff)
downloadecp-client-lean-master.tar.gz
ecp-client-lean-master.tar.xz
ecp-client-lean-master.zip
Silence NPE from reset call on certain JVMsHEADmaster
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.java7
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 {