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

Introduce OptionalEmpty Refaster rule #1156

Merged
merged 1 commit into from
Apr 30, 2024
Merged

Introduce OptionalEmpty Refaster rule #1156

merged 1 commit into from
Apr 30, 2024

Conversation

werli
Copy link
Member

@werli werli commented Apr 29, 2024

I spotted the following interesting piece of code:

Optional.ofNullable(null)

which should obviously always be:

Optional.empty()

Suggested commit message:

Introduce `OptionalEmpty` Refaster rule (#1156)

Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link
Contributor

@cernat-catalin cernat-catalin left a comment

Choose a reason for hiding this comment

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

Copy link

@oscar-picnic oscar-picnic left a comment

Choose a reason for hiding this comment

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

Productivity will be up 200%

Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

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

Wow! 😄

@Stephan202 Stephan202 requested a review from rickie April 29, 2024 16:05
@Stephan202 Stephan202 added this to the 0.17.0 milestone Apr 29, 2024
@rickie rickie force-pushed the werli/optional-empty branch from a82773e to cbba01c Compare April 30, 2024 07:14
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie force-pushed the werli/optional-empty branch from cbba01c to 1d89cc6 Compare April 30, 2024 08:02
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie merged commit 02fb6d4 into master Apr 30, 2024
15 checks passed
@rickie rickie deleted the werli/optional-empty branch April 30, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants