Skip to content

Conversation

@jdconrad
Copy link
Contributor

Adds five static methods to the Cast object to make each type of cast easier to see within the code for unboxing/boxing.

Copy link
Member

@rjernst rjernst left a 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) {
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@jdconrad
Copy link
Contributor Author

@elasticmachine test this please

@jdconrad jdconrad merged commit 1de927c into elastic:master Dec 14, 2017
@jdconrad
Copy link
Contributor Author

@rjernst Thanks for the review.

jdconrad added a commit that referenced this pull request Dec 14, 2017
Added static methods to make creating Painless casts obvious as to what is
being boxed/unboxed.
@clintongormley clintongormley added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache and removed :Plugin Lang Painless labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement v6.2.0 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants