Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-976

Exception when comparing dates with after operator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 6.4.0.Beta1
    • 6.3.0.Final
    • core engine
    • None
    • NEW
    • NEW

      It seems when we have a LHS like this:
      Order( $current.time after[1m] time )

      Drools will fail in the evaluation with this exception:
      Caused by: java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Long
      at org.drools.core.base.extractors.ConstantValueReader.getLongValue(ConstantValueReader.java:48) [drools-core-6.1.0.Final.jar:6.1.0.Final]
      at org.drools.core.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:365) [drools-core-6.1.0.Final.jar:6.1.0.Final]

      This is a PR that demonstrates the issue
      https://github.com/droolsjbpm/drools/pull/554

              mfusco@redhat.com Mario Fusco
              calca_jira Demian Calcaprina (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: