caelum / caelum-stella

O Caelum Stella visa suprir as necessidades do dia a dia do desenvolvedor brasileiro

Home Page:http://stella.caelum.com.br

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

método isEligible CPFValidator cospe NPE em valores nulos

geraldodev opened this issue · comments

user=> (def v (br.com.caelum.stella.validation.CPFValidator.))
#'user/v
user=> (.isEligible v nil)
NullPointerException   java.util.regex.Matcher.getTextLength (Matcher.java:1234)

Como a assinatura deste método retorna true ou falso seria interessante retornar falso em tipos diferentes de String ou iguais a nulo evitando assim a NullPointerException.