X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Frepository%2FLock.java;h=ed944924ca037963eea8127962584e4c3150cac0;hb=9e4535877a5bdb1811281df20caacce115f4581a;hp=9f02f089f13df82cc3e23024277febf084c6a314;hpb=be2000ec2d21151b42cb559ef881695eb32e35e9;p=nonrtric.git 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 9f02f089..ed944924 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 @@ -117,7 +117,7 @@ public class Lock { synchronized (this) { if (lockCounter <= 0) { lockCounter = -1; // Might as well stop, to make it easier to find the problem - throw new NullPointerException("Number of unlocks must match the number of locks"); + logger.error("Number of unlocks must match the number of locks"); } this.lockCounter--; if (lockCounter == 0) { @@ -130,7 +130,8 @@ public class Lock { @Override public String toString() { - return "Lock cnt: " + this.lockCounter + " exclusive: " + this.isExclusive; + return "Lock cnt: " + this.lockCounter + " exclusive: " + this.isExclusive + " queued: " + + this.lockRequestQueue.size(); } /** returns the current number of granted locks */