Eclipse is flagging multiple accessed to the same field. The field
cannot move on us, but use a local variable to make the value invariant.
Change-Id: I81599fecc77861d5011e45fa336c554e412f87dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
069b1e6e991e6d6ebe99621d201984a01c36bab0)
checkState(success, "Completed transaction %s while %s was submitted", tx, inflightTx);
final PingPongTransaction nextTx = READY_UPDATER.getAndSet(this, null);
checkState(success, "Completed transaction %s while %s was submitted", tx, inflightTx);
final PingPongTransaction nextTx = READY_UPDATER.getAndSet(this, null);
+ if (nextTx == null) {
+ final PingPongTransaction local = shutdownTx;
+ if (local != null) {
+ processTransaction(local);
+ delegate.close();
+ shutdownTx = null;
+ }
+ } else {
processTransaction(nextTx);
processTransaction(nextTx);
- } else if (shutdownTx != null) {
- processTransaction(shutdownTx);
- delegate.close();
- shutdownTx = null;