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

Support for varargs needed

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

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Minor
    • 5.3.2.Final, 5.4.0.CR1
    • 5.3.0.Final
    • drools-core
    • None

    Description

      I have a method such as:

      /*

      • determines if any of the events passed as parameter has occurred
        */
        public boolean hasAnyEventOccurred(String... events) {

      for (String s : events) {
      if (hasEventOccurred(s))

      { return true; }

      }

      return false;
      }

      However in rules I can't call it like that:

      hasAnyEventOccurred("event1", "event2", "event3"), I have to workaround as so: hasAnyEventOccurred(new String[]

      {"event1", "event2", "event3"}

      )

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            martin_a Martin A (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty