java.util.Objects in requireNonNull at line 209
java.util.Optional in of at line 113
emailvalidator4j.lexer.EmailLexer in lex at line 36
emailvalidator4j.parser.Email in parse at line 27
emailvalidator4j.EmailValidator in isValid at line 23
So the tokens is not empty, but tokens.get(0) is null -- this should probably be Optional.ofNullable.
https://github.com/egulias/EmailValidator4J/blob/master/src/main/java/emailvalidator4j/lexer/EmailLexer.java#L36
So the
tokens
is not empty, buttokens.get(0)
isnull
-- this should probably beOptional.ofNullable
.