Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
High
Description
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.