json-logic-java icon indicating copy to clipboard operation
json-logic-java copied to clipboard

Redundant storage of operations

Open melniknow opened this issue 1 year ago • 1 comments

The operations are stored in a List (expressions) and when the operation is overwritten, the old version remains in the Collection.

public final class JsonLogic {
  private final List<JsonLogicExpression> expressions;
  private final Map<String, JsonLogicNode> parseCache;
  private JsonLogicEvaluator evaluator;

  public JsonLogic() {
    this.expressions = new ArrayList<>();

melniknow avatar Mar 15 '24 06:03 melniknow

Fixed here: #40

melniknow avatar Mar 15 '24 06:03 melniknow