[jboss-jira] [JBoss JIRA] (JBRULES-3523) java.lang.ClassCastException: org.drools.facttemplates.FactTemplateObjectType cannot be cast to org.drools.base.ClassObjectType

Mario Fusco (JIRA) jira-events at lists.jboss.org
Thu Aug 16 06:19:15 EDT 2012


     [ https://issues.jboss.org/browse/JBRULES-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco reassigned JBRULES-3523:
------------------------------------

    Assignee: Mario Fusco  (was: Mark Proctor)

    
> java.lang.ClassCastException: org.drools.facttemplates.FactTemplateObjectType cannot be cast to org.drools.base.ClassObjectType
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-3523
>                 URL: https://issues.jboss.org/browse/JBRULES-3523
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Viswa Repalle
>            Assignee: Mario Fusco
>             Fix For: 5.4.1.Final, 5.5.0.Beta1
>
>
> I have analyzed the issue and found that the issue is happening at the initDeclaredMask method of BetaNode.java of drools-core-5.4.0.final.jar at the following lines of code:
>             ObjectType objectType = pattern.getObjectType();
>             if ( !(objectType instanceof ClassObjectType) ) {
>                 // InitialFact has no type declaration and cannot be property specific
>                 // Only ClassObjectType can use property specific
>                 rightDeclaredMask = Long.MAX_VALUE;
>             }
>             Class objectClass = ((ClassObjectType) objectType).getClassType();
> The above code will throw ClassCastException as irrespective of the objectType is instance of ClassObjectType or not, trying to type cast to ClassObjectType.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list