Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Updated function test environment"
[nonrtric.git]
/
policy-agent
/
src
/
main
/
java
/
org
/
oransc
/
policyagent
/
repository
/
Lock.java
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
9f02f08
..
ed94492
100644
(file)
--- 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
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) {
}
this.lockCounter--;
if (lockCounter == 0) {
@@
-130,7
+130,8
@@
public class Lock {
@Override
public String toString() {
@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 */
}
/** returns the current number of granted locks */