From 27f5689d0bc6bd9705a15feb9936426de7d6fdea Mon Sep 17 00:00:00 2001 From: "Vladislav.Soroka" Date: Wed, 18 Mar 2015 11:27:57 +0300 Subject: [PATCH] external system: unmodifiable children view list should be transient --- .../intellij/openapi/externalSystem/model/DataNode.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/DataNode.java b/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/DataNode.java index 4658f0c7b9f0..edfd3059c0d1 100644 --- a/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/DataNode.java +++ b/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/DataNode.java @@ -45,7 +45,7 @@ public class DataNode implements Serializable { private static final Logger LOG = Logger.getInstance(DataNode.class); @NotNull private final List> myChildren = ContainerUtilRt.newArrayList(); - @NotNull private final List> myChildrenView = Collections.unmodifiableList(myChildren); + @NotNull private transient List> myChildrenView = Collections.unmodifiableList(myChildren); @NotNull private final Key myKey; private transient T myData; @@ -241,6 +241,12 @@ public class DataNode implements Serializable { out.defaultWriteObject(); } + private void readObject(ObjectInputStream in) + throws IOException, ClassNotFoundException { + in.defaultReadObject(); + myChildrenView = Collections.unmodifiableList(myChildren); + } + public byte[] getDataBytes() throws IOException { if (myRawData != null) return myRawData;