uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Stenger (Jira)" <...@uima.apache.org>
Subject [jira] [Created] (UIMA-6193) Ruta: Initial assignment of list variables behaves strangely
Date Wed, 26 Feb 2020 09:30:00 GMT
Michael Stenger created UIMA-6193:

             Summary: Ruta: Initial assignment of list variables behaves strangely
                 Key: UIMA-6193
                 URL: https://issues.apache.org/jira/browse/UIMA-6193
             Project: UIMA
          Issue Type: Bug
          Components: Ruta
    Affects Versions: 2.8.0ruta
            Reporter: Michael Stenger
             Fix For: 2.8.1ruta, 3.0.1ruta

When list variables are declared with a list containing variables as initial value, the managing
VariableListExpression seems to save the variable expression given with that argument list
instead of the represented values. E.g.
INTLIST somelist = {var};{code}
for a variable
INT var = 1;
stores the expression behind var instead of the value 1. So changing the value of var after
the declaration of somelist still effects the value of somelist[0]. That's not the case if
ADD was used instead.

Consider this example:
DECLARE testType (StringArray arr);
STRING s = "a";
STRINGLIST sl = {s};
Document{ -> ADD(sl, s), s = "b", CREATE(testType, "arr" = sl)};{code}

This message was sent by Atlassian Jira

View raw message