summaryrefslogtreecommitdiffstats
path: root/controlloop/common/feature-controlloop-trans/src
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-03-14 21:52:12 +0000
committeradheli.tavares <adheli.tavares@est.tech>2024-03-15 09:49:55 +0000
commit9da69f932b1378e1d16a9206a3aa5b3acbb1d38a (patch)
treedccb457b96fe520f98f089d494a9ed174310ebce /controlloop/common/feature-controlloop-trans/src
parente3f23281573c0e75d281709bfdd74b01c2900313 (diff)
Make drools-pdp work with drools and java versions compatible
with current DRL rules files syntax. Issue-ID: POLICY-4857 Change-Id: I40889288828da9aea757087e2c74004008336e41 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'controlloop/common/feature-controlloop-trans/src')
-rw-r--r--controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java
index 93f204df3..23133f538 100644
--- a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java
+++ b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -167,10 +167,16 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics {
setNotificationValues(controller, notification);
switch (notification.getNotification()) {
- case REJECTED, FINAL_FAILURE, FINAL_SUCCESS, FINAL_OPENLOOP:
+ case REJECTED:
+ case FINAL_FAILURE:
+ case FINAL_SUCCESS:
+ case FINAL_OPENLOOP:
endTransaction(controller, notification);
break;
- case ACTIVE, OPERATION, OPERATION_SUCCESS, OPERATION_FAILURE:
+ case ACTIVE:
+ case OPERATION:
+ case OPERATION_SUCCESS:
+ case OPERATION_FAILURE:
/* any other value is an in progress transaction */
inProgressTransaction(notification);
break;
@@ -353,14 +359,14 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics {
.setEndTime(notification.getNotificationTime().toInstant());
switch (notification.getNotification()) {
- case FINAL_OPENLOOP,
+ case FINAL_OPENLOOP:
/* fall through */
- FINAL_SUCCESS:
+ case FINAL_SUCCESS:
trans.setStatusCode(true);
break;
- case FINAL_FAILURE,
+ case FINAL_FAILURE:
/* fall through */
- REJECTED:
+ case REJECTED:
trans.setStatusCode(false);
break;
default: