From 8fe27a3bf0e13d0188bc209991c07a9bcfab44d3 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 28 Aug 2020 17:19:25 -0400 Subject: Fix sonars in server-pool Addressed the following sonars in feature-server-pool: - re-interrupt after catching an InterruptException - reduce cognitive complexity - cognitive complexity - not enough arguments for logger message - use UnaryOperator instead of Function - update static fields via static methods - too many break/continue in for-loop Also fixed some Eclipse warnings: - add parameter to generic types - useless assignments - newInstance() has been deprecated - close streams Issue-ID: POLICY-2616 Change-Id: Ibf6c20e6c2a7eb8c60e1b38f388d86a0f9b8804b Signed-off-by: Jim Hahn --- .../src/test/java/org/onap/policy/drools/serverpooltest/Adapter.java | 1 + 1 file changed, 1 insertion(+) (limited to 'feature-server-pool/src/test/java/org') diff --git a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Adapter.java b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Adapter.java index 22404605..9fa54608 100644 --- a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Adapter.java +++ b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Adapter.java @@ -133,6 +133,7 @@ public abstract class Adapter { // but a new copy of class 'AdapterImpl' Adapter adapter = (Adapter) classLoader.loadClass( "org.onap.policy.drools.serverpool.AdapterImpl") + .getDeclaredConstructor() .newInstance(); // initialize the adapter -- cgit 1.2.3-korg