Skip to content
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

Cascading: improve handling of generic methods #142

Closed
rliesenfeld opened this issue Feb 18, 2015 · 0 comments
Closed

Cascading: improve handling of generic methods #142

rliesenfeld opened this issue Feb 18, 2015 · 0 comments
Assignees
Labels

Comments

@rliesenfeld
Copy link
Member

@rliesenfeld rliesenfeld commented Feb 18, 2015

For a generic method returning a type parameter having a lower bound, cascading currently creates and returns an instance of this lower bound type. This in most cases will cause a ClassCastException in client code. This issue can be avoided by a) creating an instance of the correct type, if it's given by a "Class" argument in the same call; or b) returning null if the correct subtype to return cannot be determined.

@rliesenfeld rliesenfeld self-assigned this Feb 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.