[jboss-jira] [JBoss JIRA] (DROOLS-970) Missing date coercion in constraint using an instance field or a declaration

Mario Fusco (JIRA) issues at jboss.org
Wed Nov 4 10:38:00 EST 2015


    [ https://issues.jboss.org/browse/DROOLS-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125483#comment-13125483 ] 

Mario Fusco commented on DROOLS-970:
------------------------------------

Fixed by https://github.com/droolsjbpm/drools/commit/cc9a5eab6dc5e6e2a06ace59a3d0c8e0ce282b59

> Missing date coercion in constraint using an instance field or a declaration
> ----------------------------------------------------------------------------
>
>                 Key: DROOLS-970
>                 URL: https://issues.jboss.org/browse/DROOLS-970
>             Project: Drools
>          Issue Type: Bug
>            Reporter: Mario Fusco
>            Assignee: Mario Fusco
>
> Automatic String to Date coercion is not performed in case the accessed field is not a getter method but an instance field of the class as in:
> {code}
>    public class Person {
>        public java.util.Date date;
>    }
>     rule x when
>        Person( date < "1-Jan-2000" )  // Error flagged here, if...
>     then ...end
> {code}
> or when the class has proper a getter method but the constraint is expressed with a binding declaration as in:
> {code}
>     rule x when
>          Person( $date: date, $date < "1-Jan-2000" )
>     then ...end
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list