-
Notifications
You must be signed in to change notification settings - Fork 135
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
Support safety passthrough on several streamlike methods #2174
Conversation
Generate changelog in
|
"min", | ||
"max", | ||
"findFirst", | ||
"findAny")); |
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.
Shouldn't this be every instance method on Stream
that returns another Stream
or even 'Collection'? Maybe we can list those methods using reflection instead of listing them manually?
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.
Not quite, the list does not include map
/flatMap
/mapTo*
because those methods may modify the safety of a stream. e.g. streamOfUnsafeObject.map(unsafeObject -> unsafeObject.getSafeField())
is safe. Lambda handling for this sort of thing is super duper tough though, and I'm still trying to figure out the best way to do it.
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.
Looks good!
Released 4.96.0 |
###### _excavator_ is a bot for automating changes across repositories. Changes produced by the roomba/latest-baseline-oss check. # Release Notes ## 4.96.0 | Type | Description | Link | | ---- | ----------- | ---- | | Improvement | Support safety passthrough on several streamlike methods | palantir/gradle-baseline#2174 | To enable or disable this check, please contact the maintainers of Excavator.
==COMMIT_MSG==
Support safety passthrough on several streamlike methods
==COMMIT_MSG==