-
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
Improve StreamMapToOptionalGet
Refaster template documentation
#203
Conversation
451643c
to
493db87
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 tiny tweak.
Suggested commit message:
|
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.
Just an open question but we can merge the PR already. :)
* Within a stream's map operation unconditional {@link Optional#orElseThrow()} calls can be | ||
* avoided. | ||
* | ||
* <p><strong>Warning:</strong> this rewrite rule is not completely behavior preserving. The |
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.
In most cases since we're in a stream already I suppose flattening the Optional
would be the user's intention, but I wonder how we could also convey/educate users with the changes that are made for them. Now, the process is such that if they don't like a change, they will ping @rickie to ask, but it might be nice to also think of an automated solution for templates similar to how there's documentation for bug patterns.
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.
Yeah, have been pondering the same. Ideally the Refaster
check can emit custom error messages, just like other BugChecker
s. We might be able to use annotations for this; TBD.
Next to that we should generate Github pages (or equivalent) and link to that.
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.
Also bounced a few ideas offline just now with @rickie. Annotations would be super nice -- we could also use it to indicate whether some things are behavior preserving or not, and I'm sure we can think of many more nice categories. :)
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.
There are a lot of cool ideas and options. Would be really nice to get stuff like that done 😍.
StreamMapToOptionalGet
JavadocStreamMapToOptionalGet
Refaster template documentation
No description provided.