Skip to content

Commit

Permalink
fix: double if constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaDel03 committed Dec 20, 2024
1 parent 75dbfd7 commit 1c3ca88
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
//Copyright (c) Microsoft Corporation. All rights reserved.
//Licensed under the MIT License.

/*
* SPDX-License-Identifier: AGPL-3.0-or-later
*
* Copyright (C) 2023 Ministero della Salute
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package it.finanze.sanita.fse2.ms.gtw.dispatcher.config.kafka.oauth2;

import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -101,7 +90,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);
Expand All @@ -112,7 +100,6 @@ private OAuthBearerToken getOAuthBearerToken() throws MalformedURLException, Int
this.aadClient = ConfidentialClientApplication.builder(this.appId, credential)
.authority(this.tenantId)
.build();
}
}
}

Expand Down

0 comments on commit 1c3ca88

Please sign in to comment.