From 783faded4bb852ef791bdb3409cd1bbea268b6ed Mon Sep 17 00:00:00 2001 From: Anton Lobov Date: Wed, 20 Feb 2019 11:15:55 +0100 Subject: [PATCH] json schema: don't modify the original collection --- json/src/com/jetbrains/jsonSchema/impl/JsonSchemaObject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaObject.java b/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaObject.java index 98b302a3389e..ca2b3fd21e1b 100644 --- a/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaObject.java +++ b/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaObject.java @@ -280,7 +280,7 @@ public class JsonSchemaObject { if (other.myNot != null) myNot = other.myNot; if (other.myIfThenElse != null) { if (myIfThenElse == null) myIfThenElse = other.myIfThenElse; - else myIfThenElse.addAll(other.myIfThenElse); + else myIfThenElse = ContainerUtil.concat(myIfThenElse, other.myIfThenElse); } myShouldValidateAgainstJSType |= other.myShouldValidateAgainstJSType; }