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

Executable model does not accept comparisons between some primitive types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.62.0.Final
    • 7.55.0.Final, 7.56.0.Final
    • executable model
    • None
    • 2021 Week 28-30 (from Jul 12), 2021 Week 34-36 (from Aug 23), 2021 Week 37-39 (from Sep 13)
    • Hide

      I have created a minimal test repo here:

      https://github.com/fbraun4358/drools-primitive-comparison-bug

      Running the tests shows that the executable model will fail compilation in instances where the dynamic model will not.

      Show
      I have created a minimal test repo here: https://github.com/fbraun4358/drools-primitive-comparison-bug Running the tests shows that the executable model will fail compilation in instances where the dynamic model will not.
    • Undefined
    • NEW
    • NEW

      The executable model will fail compiling when doing comparisons between primitives of some types, mainly between float and integer types.

      While the dynamic model will work for all comparison types.

      given a method like public float getFloatValue(){...} on a class, the dynamic model will work with a rule that does something like:

      ClassWithValue( floatValue != 5 )

      But the executable model will require the value check to be specified as a float like so or it will cause a compilation error:

      ClassWithValue( floatValue != 5f )

              lmolteni@redhat.com Luca Molteni
              fbraun4358 Florian Braun (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: