-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Challenge 2024 - HAFNIUM] EC1369 Use orElseGet instead of orElse #43
base: main
Are you sure you want to change the base?
[Challenge 2024 - HAFNIUM] EC1369 Use orElseGet instead of orElse #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please update CHANGELOG.md with your implemented rule ?
import java.util.List; | ||
import java.util.Objects; | ||
|
||
@Rule(key = "EC1369") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change rule id to "EC94"
This PR has been automatically marked as stale because it has no activity for 30 days. |
Parameter of orElse() is evaluated, even when having a non-empty Optional. orElseGet supplier method passed as an argument is only executed when an Optional value isn’t present :
green-code-initiative/ecoCode-challenge#77