summaryrefslogtreecommitdiffstats
path: root/auth/auth-core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-core/src/main')
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/validation/Validator.java9
1 files changed, 8 insertions, 1 deletions
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();
}