[arquillian-issues] [JBoss JIRA] (ARQGRA-424) Graphene is not able to find ParametrizedType deeper in class hierarchy

Petr Mensik (JIRA) issues at jboss.org
Thu Mar 6 12:10:33 EST 2014


    [ https://issues.jboss.org/browse/ARQGRA-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12950809#comment-12950809 ] 

Petr Mensik commented on ARQGRA-424:
------------------------------------

I have added link to the pull request.
                
> Graphene is not able to find ParametrizedType deeper in class hierarchy
> -----------------------------------------------------------------------
>
>                 Key: ARQGRA-424
>                 URL: https://issues.jboss.org/browse/ARQGRA-424
>             Project: Arquillian Graphene
>          Issue Type: Bug
>    Affects Versions: 2.0.1.Final
>            Reporter: Petr Mensik
>
> I ran into this bug when I tried to to have class inheritance like this 
> {code}public class AbstractWebDriverTest<P extends AbstractPage> extends Arquillian { }
> public class AbstractLanguageTest extends AbstractWebDriverTest<HomePage> { }
>    
> public class TestChangeLanguageWithAllAcounts extends AbstractLanguageTest { }
> {code}
> Code like this will throw an  {{java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType}} which is caused by the method {{AbstractSearchContextEnricher#getSuperClassActualTypeArguments}}. Graphene is only looking for generic parameters in the parent class and not in the all classes in the hierarchy, so this line will give you exception in case of above example.
> {code}Type[] actualTypeArguemnts = ((ParameterizedType) testCase.getClass().getGenericSuperclass()).getActualTypeArguments();{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list