Catch blank keys as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1610 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -58,7 +58,7 @@ public class KeyUtil
|
||||
public static boolean verifyLuhn (String key)
|
||||
{
|
||||
// If there is a non digit, or it is all zeros.
|
||||
if (key.matches("\\D") || key.matches("^[0]+$")) {
|
||||
if (StringUtil.blank(key) || key.matches("\\D") || key.matches("^[0]+$")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user