egulias / EmailValidator4J

Java RFC strict EmailValidator
MIT License
25 stars 8 forks source link

java.lang.NullPointerException #14

Open ea234 opened 5 years ago

ea234 commented 5 years ago

private static EmailValidator m_email4j_v = new EmailValidator();

public static void main( String[] args ) { try { String my_not_there_email_adress = null;

  System.out.println( "Test 1 " + m_email4j_v.isValid( my_not_there_email_adress ) );
}
catch ( Exception err_inst )
{
  System.out.println( "MyTest "  + err_inst.getMessage() );

  err_inst.printStackTrace( System.out );
}

System.exit( 0 );

}

MyTest null java.lang.NullPointerException at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770) at java.base/java.util.regex.Matcher.reset(Matcher.java:416) at java.base/java.util.regex.Matcher.(Matcher.java:253) at java.base/java.util.regex.Pattern.matcher(Pattern.java:1133) at emailvalidator4j.lexer.EmailLexer.lex(EmailLexer.java:23) at emailvalidator4j.parser.Email.parse(Email.java:25) at emailvalidator4j.EmailValidator.isValid(EmailValidator.java:23) at de.system.MyTest.main(MyTest.java:102)