aboutsummaryrefslogtreecommitdiffstats
path: root/utils-test/src/main/java/org/onap/policy/common/utils/test/ToStringTester.java
diff options
context:
space:
mode:
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.java14
1 files changed, 5 insertions, 9 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 f9ae39ac..ab09291c 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
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,7 +29,7 @@ import com.openpojo.reflection.PojoClass;
import com.openpojo.validation.affirm.Affirm;
import com.openpojo.validation.test.Tester;
import com.openpojo.validation.utils.ValidationHelper;
-
+import lombok.AllArgsConstructor;
import org.hamcrest.Matcher;
@@ -38,23 +38,19 @@ import org.hamcrest.Matcher;
*
* @author Ram Krishna Verma (ram.krishna.verma@est.tech)
*/
-@SuppressWarnings("rawtypes")
+@AllArgsConstructor
public class ToStringTester implements Tester {
- private final Matcher matcher;
+ private final Matcher<?> matcher;
public ToStringTester() {
matcher = anything();
}
- 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);