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

Fix potential NPE on Optional objects #4428

Merged
merged 1 commit into from Nov 8, 2021
Merged

Conversation

Florian14
Copy link
Contributor

toOptional() function was safe called (prefixed by ?.) causing the resulting Optional object to be null instead of encapsulating the null value inside the Optional object (which is the purpose of this object).

@Florian14 Florian14 requested a review from bmarty November 8, 2021 14:44
@github-actions
Copy link

github-actions bot commented Nov 8, 2021

Unit Test Results

  62 files  ±0    62 suites  ±0   50s ⏱️ -8s
118 tests ±0  118 ✔️ ±0  0 💤 ±0  0 ±0 
350 runs  ±0  350 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 8140d90. ± Comparison against base commit 2b58c0e.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@bmarty bmarty merged commit 9ebc234 into develop Nov 8, 2021
@bmarty bmarty deleted the feature/fre/fix_optional_npe branch November 8, 2021 15:37
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.

None yet

3 participants