aboutsummaryrefslogtreecommitdiffstats
path: root/utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-06-18 10:42:08 -0400
committerJim Hahn <jrh3@att.com>2020-06-18 13:34:03 -0400
commit6c750f414961b3956919ef457d1bf1eb82064d15 (patch)
tree5d9df6c0f59ba72d584dcd99fb3d9575fc76f5f0 /utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java
parent611f63a4bb71d677cf2665b1794e91148ba42a51 (diff)
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 <jrh3@att.com>
Diffstat (limited to 'utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java')
-rw-r--r--utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java7
1 files changed, 3 insertions, 4 deletions
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);