diff options
author | Jim Hahn <jrh3@att.com> | 2020-06-29 17:43:07 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-06-29 17:44:28 -0400 |
commit | c2e0698897c060a91a5212f8f42d8aa2a9b96e65 (patch) | |
tree | 62dc0d58d1f4a4350e96ad24159882ecd0aed445 /controlloop/common/eventmanager/src/main | |
parent | 5814190df5c082e5b681baf336f9e45ba88c3658 (diff) |
Fix build breakage in drools-apps due to pair
The Pair changes made in drools-pdp also broke drools-apps builds.
Replaced usage of drools.utils.Pair with apache Pair.
Issue-ID: POLICY-2202
Change-Id: I50aaad47c243637688602ae6cb680a929fe3edd9
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/main')
-rw-r--r-- | controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java index 6e88ce982..5546a0baa 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java @@ -37,6 +37,7 @@ import java.util.UUID; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Pair; import org.onap.policy.aai.AaiCqResponse; import org.onap.policy.aai.AaiManager; import org.onap.policy.aai.util.AaiException; @@ -54,7 +55,6 @@ import org.onap.policy.drools.core.lock.LockCallback; import org.onap.policy.drools.core.lock.LockImpl; import org.onap.policy.drools.core.lock.LockState; import org.onap.policy.drools.system.PolicyEngineConstants; -import org.onap.policy.drools.utils.Pair; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; import org.onap.policy.rest.RestManager; import org.slf4j.Logger; @@ -525,12 +525,12 @@ public class ControlLoopEventManager implements Serializable { if (this.targetLock != null) { // we have the lock - just extend it this.targetLock.extend(holdSec, callback); - return new Pair<>(oldLock, null); + return Pair.of(oldLock, null); } else if (this.useTargetLock) { this.targetLock = createRealLock(this.currentOperation.getTargetEntity(), this.onset.getRequestId(), holdSec, callback); - return new Pair<>(oldLock, this.targetLock); + return Pair.of(oldLock, this.targetLock); } else { // Not using target locks - create a lock w/o actually locking. @@ -540,7 +540,7 @@ public class ControlLoopEventManager implements Serializable { // Note: no need to invoke callback, as the lock is already ACTIVE - return new Pair<>(oldLock, this.targetLock); + return Pair.of(oldLock, this.targetLock); } } |