Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-4233

Ruta: NPE for Gather on optional rule element

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1ruta
    • Fix Version/s: 2.3.0ruta
    • Component/s: Ruta
    • Labels:
      None

      Description

      A user reported on the mailing list:

      The following RUTA grammar:

      DECLARE Annotation A;
      DECLARE Annotation B;
      DECLARE Annotation C(Annotation a, Annotation b);
      
      W{REGEXP("A")->MARK(A)};
      W{REGEXP("B")->MARK(B)};
      
      A B?{-> GATHER(C, 1, 2, "a" = 1, "b" = 2)};
      

      Run s as expected on the input "A B C", but gets a NullPointerException on
      "A X C", presumably because the 2 index is not mapped to anything.

        Attachments

          Activity

            People

            • Assignee:
              pkluegl Peter Klügl
              Reporter:
              pkluegl Peter Klügl
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: