From 1dd02a0d0e604a82e67f04559e213db76c9ebac5 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Wed, 21 Feb 2018 12:21:35 +0200 Subject: [PATCH 1/1] 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 --- .../src/fi/vtt/simantics/procore/internal/State.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } } -- 2.43.2