CI: Add SonarCloud scan GHA workflow
[nonrtric/plt/ranpm.git] / pmproducer / src / main / java / org / oran / pmproducer / clients / AsyncRestClient.java
index ac76436..4031559 100644 (file)
@@ -29,6 +29,7 @@ import java.lang.invoke.MethodHandles;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.oran.pmproducer.configuration.WebClientConfig.HttpProxyConfig;
+import org.oran.pmproducer.oauth2.SecurityContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.http.MediaType;
@@ -144,8 +145,7 @@ public class AsyncRestClient {
     }
 
     private void onError(Throwable t) {
-        if (t instanceof WebClientResponseException) {
-            WebClientResponseException e = (WebClientResponseException) t;
+        if (t instanceof WebClientResponseException e) {
             logger.debug("Response error: {}", e.getResponseBodyAsString());
         }
     }