Skip to content

Change Optional.of() to null-safe Optional.ofNullable() in SelectQueryInternal#firstResult#89

Open
MichaelOwenDyer wants to merge 1 commit into
cellux-git:masterfrom
MichaelOwenDyer:master
Open

Change Optional.of() to null-safe Optional.ofNullable() in SelectQueryInternal#firstResult#89
MichaelOwenDyer wants to merge 1 commit into
cellux-git:masterfrom
MichaelOwenDyer:master

Conversation

@MichaelOwenDyer

Copy link
Copy Markdown

The method SelectQueryInternal#firstResult will cause a NullPointerException if the Mapper returns a null object and the Predicate does not exclude this null object. Changing the Optional.of() call to Optional.ofNullable() would prevent a NullPointerException from being thrown.

Change Optional.of() call to null-safe 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

Successfully merging this pull request may close these issues.

1 participant