From: PatrikBuhr Date: Wed, 3 Jun 2020 09:59:00 +0000 (+0200) Subject: Bug fix, Lock X-Git-Tag: 2.0.0~20 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=bd30ef4a1c87d27491bcbf8b60bd6627bec85a48;p=nonrtric.git 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 --- 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