[jboss-jira] [JBoss JIRA] Closed: (JBRULES-843) getter return type java.lang.Object seems to map to ARRAY_TYPE

Mark Proctor (JIRA) jira-events at lists.jboss.org
Thu Jul 5 09:00:51 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-843?page=all ]

Mark Proctor closed JBRULES-843.
--------------------------------

    Resolution: Out of Date

It looks like this was already fixed:
ValueType.determineValueType already has:
        } else if ( clazz.isArray() ) {
            return ValueType.ARRAY_TYPE;
So I'm marking this out of date. If its still broken please provide a unit test for us, and we'll fix asap.

> getter return type java.lang.Object seems to map to ARRAY_TYPE
> --------------------------------------------------------------
>
>                 Key: JBRULES-843
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-843
>             Project: JBoss Rules
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.0.6
>            Reporter: Juergen none
>         Assigned To: Mark Proctor
>             Fix For:  4.0.0.MR4
>
>
> if a fact defines a getter with return value type java.lang.Object, the org.drools.base.ClassObjectType::setTypeValue() seems to set the object type to ARRAY_TYPE, because: java.lang.Object.class.isAssignableFrom(Object[].class) == true
> Caused by: java.lang.ClassCastException: test.A
>         at org.drools.base.evaluators.ArrayFactory$ArrayNotEqualEvaluator.evaluate(ArrayFactory.java:82)
>         at org.drools.rule.BoundVariableConstraint.isAllowed(BoundVariableConstraint.java:78)
>         at org.drools.common.BetaNodeBinder.isAllowed(BetaNodeBinder.java:63)
>         at org.drools.reteoo.TupleSource.attemptJoin(TupleSource.java:99)
>         at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:122)
>         at org.drools.reteoo.LeftInputAdapterNode.createAndAssertTuple(LeftInputAdapterNode.java:176)
>         at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:145)
> ...

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