Instance<> fails when parameterized

39 views
Skip to first unread message

ulrich gratz

unread,
Aug 28, 2014, 5:42:32 AM8/28/14
to cdi-...@googlegroups.com
Hi there,

we're using jglue 3.0.1 and the following injection:

@Inject
Instance<BaseRestClient<?>> restClients;

While the production code works (and the tests did as well with jGlue 2.2.1) the test are broken with version 3.0.1 with the  following exception:

java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
at org.jglue.cdiunit.internal.WeldTestUrlDeployment.<init>(WeldTestUrlDeployment.java:248)
at org.jglue.cdiunit.CdiRunner$1.createDeployment(CdiRunner.java:83)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:137)
at org.jglue.cdiunit.CdiRunner.createTest(CdiRunner.java:94)

Are we doing something wrong?

Best regards,
Ulrich

Bryn Cooke

unread,
Aug 28, 2014, 5:44:47 AM8/28/14
to cdi-...@googlegroups.com
Looks like a bug,

First please try HEAD. If that doesn't fix things please open an issue on the tracker with enough info so that I can recreate the issue.

Many thanks,
Bryn
--
You received this message because you are subscribed to the Google Groups "CDI-Unit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cdi-unit+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages