summaryrefslogtreecommitdiffstats
path: root/auth/auth-core
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-core')
-rw-r--r--auth/auth-core/pom.xml2
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java9
2 files changed, 9 insertions, 2 deletions
diff --git a/auth/auth-core/pom.xml b/auth/auth-core/pom.xml
index 13952e4c..a7ae68c6 100644
--- a/auth/auth-core/pom.xml
+++ b/auth/auth-core/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>authparent</artifactId>
- <version>2.1.14-SNAPSHOT</version>
+ <version>2.1.15-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java
index 98c09076..6d519c64 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java
@@ -86,8 +86,15 @@ public class Validator {
}
protected final boolean noMatch(String str, Pattern p) {
- return !p.matcher(str).matches();
+ return str==null || !p.matcher(str).matches();
}
+
+ protected final void match(String text, String str, Pattern p) {
+ if(str==null || !p.matcher(str).matches()) {
+ msg(text);
+ }
+ }
+
protected final boolean nob(String str, Pattern p) {
return str==null || !p.matcher(str).matches();
}