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

[Challenge 2024 - HAFNIUM] EC1369 Use orElseGet instead of orElse #323

Merged
merged 4 commits into from
Jun 13, 2024

Conversation

Samdespion
Copy link

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/creedengo-challenge#77

@Samdespion Samdespion changed the title Feature Add rule EC1369 [Challenge 2024 - HAFNIUM] Feature Add rule EC1369 May 30, 2024
@Samdespion Samdespion changed the title [Challenge 2024 - HAFNIUM] Feature Add rule EC1369 [Challenge 2024 - HAFNIUM] EC1369 Use orElseGet instead of orElse May 30, 2024
Copy link
Member

@dedece35 dedece35 left a comment

Choose a reason for hiding this comment

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

could please add a new line in CHANGELOG.md file , please

@dedece35 dedece35 merged commit b6c2ea9 into green-code-initiative:main Jun 13, 2024
1 check passed
@dedece35 dedece35 changed the title [Challenge 2024 - HAFNIUM] EC1369 Use orElseGet instead of orElse [Challenge 2024 - HAFNIUM] EC94 Use orElseGet instead of orElse Jun 13, 2024
@dedece35 dedece35 changed the title [Challenge 2024 - HAFNIUM] EC94 Use orElseGet instead of orElse [Challenge 2024 - HAFNIUM] EC1369 Use orElseGet instead of orElse Jun 13, 2024
@dedece35
Copy link
Member

PR accepted and updated like follow :

  • modification to EC94 rule id
  • CHANGELOG.md updated

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.

2 participants