insights-core icon indicating copy to clipboard operation
insights-core copied to clipboard

Feature: ensure parser/Combiner components are immutable

Open chenlizhong opened this issue 2 years ago • 0 comments

The Parser components are to parse the content of files or output of commands. The dependence is as below.

Files/output of Command -------> DataSource ------> Parser

Suggest to ensure the Parser components are immutable. The reasons are as below:

  1. The objects of Parsers are standing for the content of files or output of commands. it must reflect original values in files or commands.
  2. The objects of Parsers are shared dependence of Combiners/Conditions. If someone updated the object of one Parser casually in one Condition, it will impact all following Conditions

According above second reason, Combiner class need be immutable also.

Welcome any comments.

chenlizhong avatar Jan 13 '23 01:01 chenlizhong