From 6c750f414961b3956919ef457d1bf1eb82064d15 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 18 Jun 2020 10:42:08 -0400 Subject: More sonar issues in policy-common Addressed the following sonar issues: - add parameters to types - ObjectInputStream.readObject() is unsafe Issue-ID: POLICY-2650 Change-Id: I41e1bd08643b04f409ce87c884cb0c28995e431b Signed-off-by: Jim Hahn --- .../java/org/onap/policy/common/utils/test/ToStringTester.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java') diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java b/utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java index 18502a35..3890ae95 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java @@ -37,23 +37,22 @@ import org.hamcrest.Matcher; * * @author Ram Krishna Verma (ram.krishna.verma@est.tech) */ -@SuppressWarnings("rawtypes") public class ToStringTester implements Tester { - private final Matcher matcher; + private final Matcher matcher; public ToStringTester() { matcher = anything(); } - public ToStringTester(final Matcher matcher) { + public ToStringTester(final Matcher matcher) { this.matcher = matcher; } @SuppressWarnings("unchecked") @Override public void run(final PojoClass pojoClass) { - final Class clazz = pojoClass.getClazz(); + final Class clazz = pojoClass.getClazz(); if (anyOf(matcher).matches(clazz)) { final Object classInstance = ValidationHelper.getBasicInstance(pojoClass); -- cgit 1.2.3-korg