Cascading: ClassCastException from generic method whose return type uses two type parameters #158

rliesenfeld opened this Issue Mar 20, 2015 · 0 comments


1 participant

rliesenfeld commented Mar 20, 2015

The following example test fails with a CCE:

    public interface GenericInterface<T> { <S extends T> S save(S entity); }
    public interface ConcreteInterface extends GenericInterface<String> {}

    public void cascadingFromGenericMethodWhoseTypeParameterExtendsAnother(@Mocked ConcreteInterface mock)
        String value = "test";

        String saved =;


@rliesenfeld rliesenfeld added the bug label Mar 20, 2015

@rliesenfeld rliesenfeld self-assigned this Mar 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment