[jboss-jira] [JBoss JIRA] Created: (JBAOP-478) ClassCastException on AnnotatedParameterAdviceInfo

Flavia Rainone (JIRA) jira-events at lists.jboss.org
Wed Oct 10 13:33:03 EDT 2007


ClassCastException on AnnotatedParameterAdviceInfo
--------------------------------------------------

                 Key: JBAOP-478
                 URL: http://jira.jboss.com/jira/browse/JBAOP-478
             Project: JBoss AOP
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Flavia Rainone
         Assigned To: Flavia Rainone


This is what happens when line 464 of AnnotatedAdviceInfo is executed with a method that returns a parameterized type:
java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
        at org.jboss.aop.advice.annotation.AnnotatedParameterAdviceInfo$SingleParameterType.internalValidate(AnnotatedParameterAdviceInfo.java:464)
        at org.jboss.aop.advice.annotation.AnnotatedParameterAdviceInfo$ParameterAnnotationType.validate(AnnotatedParameterAdviceInfo.java:374)
        at org.jboss.aop.advice.annotation.AnnotatedParameterAdviceInfo.matches(AnnotatedParameterAdviceInfo.java:124)
        at org.jboss.aop.advice.annotation.AdviceMethodFactory.bestValidAdvice(AdviceMethodFactory.java:412)
        at org.jboss.aop.advice.annotation.AdviceMethodFactory.findAdviceMethod(AdviceMethodFactory.java:291)
        at org.jboss.aop.instrument.JoinPointGenerator$AdviceSetups.<init>(JoinPointGenerator.java:1532)
        at org.jboss.aop.instrument.JoinPointGenerator.initialiseAdviceInfosAndAddFields(JoinPointGenerator.java:550)
        at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:399)
        at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:276)
        at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:75)
        at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$1$1.run(JoinPointGenerator.java:1630)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$1.generateJoinPointClass(JoinPointGenerator.java:1626)
        at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:244)
        at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1017)
        at org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO$ReturnInvalidPOJOAdvisor.methodGenericsAfter54841465230530634828(ReturnInvalidPOJO$Retu
rnInvalidPOJOAdvisor.java)

This task includes a check on the code to see if the error is repeated in other code lines.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list