#2576 closed defect (done)

VariableCondition symbol is deserialized incorrectly

Reported by: pfleck Owned by: ascheibe
Priority: medium Milestone: HeuristicLab 3.3.14
Component: Problems.DataAnalysis.Symbolic Version: 3.3.13
Keywords: Cc:

Description (last modified by mkommend)

After deserializing a VariableCondition symbol, all variables are checked. This is caused because the storable property AllVariableNames resets the VariableNames.

Connected to #1865 in which the implementation of the Variable has been corrected, but the VariableCondition was overlooked.

private List<string> variableNames;
[Storable]
public IEnumerable<string> VariableNames {
  get { return variableNames; }
  set {
    if (value == null) throw new ArgumentNullException();
    variableNames.Clear();
    variableNames.AddRange(value);
    OnChanged(EventArgs.Empty);
  }
}

private List<string> allVariableNames;
[Storable]
public IEnumerable<string> AllVariableNames {
  get { return allVariableNames; }
  set {
    if (value == null) throw new ArgumentNullException();
    allVariableNames.Clear();
    allVariableNames.AddRange(value);
    VariableNames = value;
  }
}

Change History (7)

comment:1 Changed 18 months ago by mkommend

  • Owner set to mkommend
  • Status changed from new to accepted

comment:2 Changed 18 months ago by mkommend

  • Description modified (diff)

comment:3 Changed 18 months ago by mkommend

r13616: Quickfix for deserializing the VariableCondition symbol correctly.

Last edited 15 months ago by mkommend (previous) (diff)

comment:4 Changed 15 months ago by mkommend

  • Owner changed from mkommend to gkronber
  • Status changed from accepted to reviewing

comment:5 Changed 14 months ago by gkronber

Tested and reviewed r13616. Fine by me.

comment:6 Changed 14 months ago by gkronber

  • Owner changed from gkronber to ascheibe
  • Status changed from reviewing to readytorelease

comment:7 Changed 13 months ago by ascheibe

  • Resolution set to done
  • Status changed from readytorelease to closed

r13913 merged r13616 into stable

Note: See TracTickets for help on using tickets.