-
Notifications
You must be signed in to change notification settings - Fork 39
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 EnumReferenceEqualityLambda
Refaster rule
#1239
Conversation
Looks good. No mutations were possible for these changes. |
2c79bde
to
c7c6d3d
Compare
Looks good. No mutations were possible for these changes. |
9810772
to
dd6235e
Compare
Looks good. No mutations were possible for these changes. |
PredicateIsEqualEnums
EnumReferenceEqualityLambda
Refaster rule
dd6235e
to
3227949
Compare
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.
Rebased and added a commit; also updated the suggested commit message and PR title.
(Not sure the ::equals
rewrite is always an improvement. Ideally we benchmark this; should get back to finishing the benchmark framework I started working on 😬.)
@@ -33,6 +34,12 @@ boolean testEqualsPredicate() { | |||
return Stream.of("foo").anyMatch(s -> "bar".equals(s)); | |||
} | |||
|
|||
ImmutableSet<Boolean> testEnumsReferenceEqualityLambda() { |
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.
This one should be moved up a bit.
Stream.of(RoundingMode.UP).anyMatch(isEqual(RoundingMode.DOWN)), | ||
Stream.of(RoundingMode.UP).anyMatch(RoundingMode.DOWN::equals)); |
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.
We don't need the Stream
expressions for this test.
Looks good. No mutations were possible for these changes. |
Quality Gate passedIssues Measures |
Suggested commit message: