From: Tuukka Lehtonen Date: Wed, 21 Feb 2018 10:21:35 +0000 (+0200) Subject: Defer change set disposal in State.commitWriteTransaction X-Git-Tag: v1.43.0~136^2~581 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=1dd02a0d0e604a82e67f04559e213db76c9ebac5;p=simantics%2Fplatform.git Defer change set disposal in State.commitWriteTransaction The change set was still used after disposal in notifying db change listeners. refs #6233 Change-Id: I3e9f49ea084703afdc2129162402ab592f2f3f72 --- diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java index 3199901e9..91faa7198 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java @@ -332,7 +332,6 @@ class State { // deny can always remove a persistent statement. clusterStream.reallyFlush(); - Disposable.safeDispose(session.clientChanges); session.clientChanges = new ClientChangesImpl(session); @@ -385,6 +384,7 @@ class State { this.close(); // Everything is lost anyway. throw new IllegalStateException(e); } finally { + Disposable.safeDispose(cs); lock.unlock(); } }