[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 10:30:34 EST 2014


Petr Mensik created ARQGRA-424:
----------------------------------

             Summary: 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 

public class AbstractWebDriverTest<P extends AbstractPage> extends Arquillian { }

public class AbstractLanguageTest extends AbstractWebDriverTest<HomePage> { }
   
public class TestChangeLanguageWithAllAcounts extends AbstractLanguageTest { }

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 getSuperClassActualTypeArguments in the AbstractSearchContextEnricher. Graphene is only looking for generic parameters in the parent class and not in all class in the hierarchy, so this line will give you exception in case of above example.

Type[] actualTypeArguemnts = ((ParameterizedType) testCase.getClass().getGenericSuperclass()).getActualTypeArguments();



--
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