null safe wildcard matching
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Thu, 26 Dec 2013 18:23:53 +0000 (20:23 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Thu, 26 Dec 2013 18:23:53 +0000 (20:23 +0200)
src/main/java/eu/svjatoslav/commons/string/WildCardMatcher.java

index 6e3031d..3090184 100755 (executable)
@@ -37,6 +37,12 @@ public class WildCardMatcher {
        public static boolean match(final String inputString,
                        final String wildcardExpression) {
 
+               if (inputString == null)
+                       return false;
+
+               if (wildcardExpression == null)
+                       return false;
+
                int i;
 
                for (i = 0; i < inputString.length(); i++) {