From 27777e50dd6b26ed41442c7fcc0669c32b59d4d3 Mon Sep 17 00:00:00 2001 From: Andrea De Lella Date: Thu, 19 Dec 2024 17:08:10 +0100 Subject: [PATCH] fix: sonarQube issue --- .../config/kafka/oauth2/CustomAuthenticateCallbackHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java index c23758d..5e0a214 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java @@ -1,6 +1,7 @@ //Copyright (c) Microsoft Corporation. All rights reserved. //Licensed under the MIT License. + /* * SPDX-License-Identifier: AGPL-3.0-or-later * @@ -101,7 +102,6 @@ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallback private OAuthBearerToken getOAuthBearerToken() throws MalformedURLException, InterruptedException, ExecutionException, TimeoutException { if (this.aadClient == null) { synchronized(this) { - if (this.aadClient == null) { IClientCredential credential = null; try (FileInputStream certificato = new FileInputStream(new File(pfxPathName))) { credential = ClientCredentialFactory.createFromCertificate(certificato, this.pwd); @@ -112,7 +112,6 @@ private OAuthBearerToken getOAuthBearerToken() throws MalformedURLException, Int this.aadClient = ConfidentialClientApplication.builder(this.appId, credential) .authority(this.tenantId) .build(); - } } }