Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3684

MVEL is having issues resolving a generic member in a concrete type

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 6.0.0.Alpha1
    • 5.5.0.CR1
    • drools-compiler
    • None

    Description

      Not sure if this is related to Drools use of MVEL or MVEl itself...

      I have 2 classes:

      public abstract class AbstractBase<T> {
      protected T foo;
      public T getFoo()

      { return foo; }

      }

      public class StringConcrete extends AbstractBase<String> {
      public StringConcrete()

      { this.foo = new String(); }

      }

      The following rule fails in MVEL dialect, but passes in Java dialect.

      rule "test"
      dialect "mvel"
      when
      $S : StringConcrete()
      then
      System.out.println( $S.getFoo().concat("this works with java dialect") );
      end

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            jholmes@redhat.com Justin Holmes (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty