-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Clean Up Painless Cast Object #27794
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
Conversation
equivalent Java class or the imported version of the Java class.
being boxed/unboxed.
rjernst
left a comment
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 looks fine as it is purely mechanical. I have one request.
| } | ||
|
|
||
| public static class Cast { | ||
| public static Cast standard(Type from, Type to, boolean explicit) { |
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.
If we're going to have these helper methods, please at least give a one line javadoc explaining each one.
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.
Done.
|
@elasticmachine test this please |
|
@rjernst Thanks for the review. |
Added static methods to make creating Painless casts obvious as to what is being boxed/unboxed.
Adds five static methods to the Cast object to make each type of cast easier to see within the code for unboxing/boxing.