Skip to content

NPE in EmailLexer #19

@will-sargent-eero

Description

@will-sargent-eero

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions