Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in EmailLexer #19

Open
will-sargent-eero opened this issue Oct 12, 2023 · 0 comments
Open

NPE in EmailLexer #19

will-sargent-eero opened this issue Oct 12, 2023 · 0 comments

Comments

@will-sargent-eero
Copy link

https://github.com/egulias/EmailValidator4J/blob/master/src/main/java/emailvalidator4j/lexer/EmailLexer.java#L36

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant