diff options
author | Jim Hahn <jrh3@att.com> | 2020-08-28 17:19:25 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-08-28 18:36:54 -0400 |
commit | 8fe27a3bf0e13d0188bc209991c07a9bcfab44d3 (patch) | |
tree | 0b37b8d045eb3995b31593ad6b1cc8985352b001 /feature-server-pool/src/test | |
parent | 3fb61743113683b2be271429263a96fb0a7dd90a (diff) |
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 <jrh3@att.com>
Diffstat (limited to 'feature-server-pool/src/test')
-rw-r--r-- | feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Adapter.java | 1 |
1 files changed, 1 insertions, 0 deletions
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 |