From bd30ef4a1c87d27491bcbf8b60bd6627bec85a48 Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Wed, 3 Jun 2020 11:59:00 +0200 Subject: [PATCH] Bug fix, Lock When a pending lock is added to the queue (for pending locks), the lock may already be released. In that case, no notifyAll() will be called. Change-Id: I4d63d5656b09ab0cb9d5f242c9abf9d708fb1a9b Issue-ID: NONRTRIC-195 Signed-off-by: PatrikBuhr --- policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java | 1 + 1 file changed, 1 insertion(+) diff --git a/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java b/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java index ed944924..a19870be 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java @@ -167,6 +167,7 @@ public class Lock { private synchronized void addToQueue(MonoSink callback, LockType lockType) { lockRequestQueue.add(new LockRequest(callback, lockType, this)); + processQueuedEntries(); } @SuppressWarnings("java:S2274") // Always invoke wait() and await() methods inside a loop -- 2.16.6