summaryrefslogtreecommitdiffstats
path: root/models-base/src/main/java/org
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-04-09 11:55:57 +0000
committerliamfallon <liam.fallon@est.tech>2019-04-09 11:55:57 +0000
commit9ede89131044d171187c5be906aefee615a0e568 (patch)
treed77966aa7aa12ea520bacdbe835355ba20cccb65 /models-base/src/main/java/org
parentc54b9408a10c0060e35be2ee0b5bac6a24e9153a (diff)
Complete unit test for models-pdp
This review completes the unit test for the models-pdp module, for persistence of PDP groups and for PDP group filtering. Added unit test of filters for TOSCA policy types and policies. Added fix to allow filters to pass when the value being checked is null. Issue-ID: POLICY-1095 Change-Id: I982400ef39f0282d813d49e484a58207e03b8a63 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-base/src/main/java/org')
-rw-r--r--models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java b/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java
index 501d9c353..10ce4ea60 100644
--- a/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java
+++ b/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java
@@ -49,8 +49,8 @@ public interface PfObjectFilter<T extends Comparable<T>> {
* @param pattern the pattern to check against
* @return match or not
*/
- public default boolean filterString(@NonNull final String value, final String pattern) {
- return pattern == null || value.equals(pattern);
+ public default boolean filterString(final String value, final String pattern) {
+ return value == null || pattern == null || value.equals(pattern);
}
/**