aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java')
-rw-r--r--policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java
index a9305e51..97e7242d 100644
--- a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java
+++ b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java
@@ -130,11 +130,11 @@ public class PolicyResourceLockManager extends SimpleLockManager {
}
- return doBoolIntercept(impl -> impl.beforeIsLocked(resourceId), () -> {
+ return doBoolIntercept(impl -> impl.beforeIsLocked(resourceId), () ->
// implementer didn't do the work - defer to the superclass
- return super.isLocked(resourceId);
- });
+ super.isLocked(resourceId)
+ );
}
/**
@@ -151,11 +151,11 @@ public class PolicyResourceLockManager extends SimpleLockManager {
throw makeNullArgException(MSG_NULL_OWNER);
}
- return doBoolIntercept(impl -> impl.beforeIsLockedBy(resourceId, owner), () -> {
+ return doBoolIntercept(impl -> impl.beforeIsLockedBy(resourceId, owner), () ->
// implementer didn't do the work - defer to the superclass
- return super.isLockedBy(resourceId, owner);
- });
+ super.isLockedBy(resourceId, owner)
+ );
}
/**
@@ -210,6 +210,8 @@ public class PolicyResourceLockManager extends SimpleLockManager {
*/
private static class Singleton {
+ private static final PolicyResourceLockManager instance = new PolicyResourceLockManager();
+
/**
* Not invoked.
*/
@@ -217,7 +219,6 @@ public class PolicyResourceLockManager extends SimpleLockManager {
super();
}
- private static final PolicyResourceLockManager instance = new PolicyResourceLockManager();
}
/**