Cascading: improve handling of generic methods #142

rliesenfeld opened this Issue Feb 18, 2015 · 0 comments


1 participant

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