From a1da8fc7a0b19288c349de6e5ad812b6c38f565e Mon Sep 17 00:00:00 2001 From: Melissa Linkert Date: Tue, 12 Mar 2024 19:15:19 -0500 Subject: [PATCH] Always use a new CookieManager instead of the default --- .../qupath/lib/images/servers/omero/OmeroWebClient.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/qupath/lib/images/servers/omero/OmeroWebClient.java b/src/main/java/qupath/lib/images/servers/omero/OmeroWebClient.java index 6e2d1ec6..cce735b7 100644 --- a/src/main/java/qupath/lib/images/servers/omero/OmeroWebClient.java +++ b/src/main/java/qupath/lib/images/servers/omero/OmeroWebClient.java @@ -176,10 +176,8 @@ public void run() { String authenticate(final PasswordAuthentication authentication, final int serverID) throws Exception { var handler = CookieHandler.getDefault(); - if (handler == null) { - handler = new CookieManager(null, CookiePolicy.ACCEPT_ALL); - CookieHandler.setDefault(handler); - } + handler = new CookieManager(null, CookiePolicy.ACCEPT_ALL); + CookieHandler.setDefault(handler); if (this.token == null) this.token = getCSRFToken();