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

Reincarnated Bug (reminiscent of Issue 350) - ClassCastException with sophisticated generic class hierarchy #29

Closed
hamid-nazari opened this Issue Aug 7, 2014 · 0 comments

Comments

2 participants
@hamid-nazari

hamid-nazari commented Aug 7, 2014

JMockit 1.10
TestNG 6.8.6.20141201_2240 (eclipse plug-in)
JDK 1.8

Some part of the the bug reported previously on Google's issue tracker, Issue 350, which was totally fixed by version 1.9, is back again in version 1.10. Specifically, the test case genericsFailure_ClassCast2, provided by the test suite attached to that reported issue, now fails again with the following error:

FAILED: genericsFailure_ClassCast2(tests.JMockitGenericsFailureTests$BackImpl@5ae63ade)
java.lang.IllegalArgumentException: tests.JMockitGenericsFailureTests$AppImpl is not an interface
    at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:590)
    at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
    at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
    at java.lang.reflect.WeakCache.get(WeakCache.java:127)
    at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
    at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
    at tests.JMockitGenericsFailureTests$BackImpl.getApp(JMockitGenericsFailureTests.java)
    at tests.JMockitGenericsFailureTests$3.<init>(JMockitGenericsFailureTests.java:127)
    at tests.JMockitGenericsFailureTests.genericsFailure_ClassCast2(JMockitGenericsFailureTests.java:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:483)

@rliesenfeld rliesenfeld added the bug label Aug 8, 2014

@rliesenfeld rliesenfeld self-assigned this Aug 8, 2014

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