external system: unmodifiable children view list should be transient

This commit is contained in:
Vladislav.Soroka
2015-03-18 11:30:18 +03:00
parent d29678738a
commit 27f5689d0b
@@ -45,7 +45,7 @@ public class DataNode<T> implements Serializable {
private static final Logger LOG = Logger.getInstance(DataNode.class);
@NotNull private final List<DataNode<?>> myChildren = ContainerUtilRt.newArrayList();
@NotNull private final List<DataNode<?>> myChildrenView = Collections.unmodifiableList(myChildren);
@NotNull private transient List<DataNode<?>> myChildrenView = Collections.unmodifiableList(myChildren);
@NotNull private final Key<T> myKey;
private transient T myData;
@@ -241,6 +241,12 @@ public class DataNode<T> 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;