From df085d42892442a3bea3e72626c9476a14404316 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 21 Dec 2016 14:17:35 +0100 Subject: [PATCH] BUG-5280: fix InversibleLock race Do not read latch twice, as it may end up being cleared asynchronously. This is a typo, as the reuse is exactly why we read the latch into a local variable. Change-Id: If90bd157be6e20d69f158bc749f163c1008541a4 Signed-off-by: Robert Varga --- .../controller/cluster/access/client/InversibleLock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/InversibleLock.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/InversibleLock.java index ea4e5817dd..08bc05346b 100644 --- a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/InversibleLock.java +++ b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/InversibleLock.java @@ -45,7 +45,7 @@ public final class InversibleLock { // and force release of locks. final CountDownLatch local = latch; if (local != null) { - throw new InversibleLockException(latch); + throw new InversibleLockException(local); } // No latch present: retry optimistic lock -- 2.36.6