aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java10
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java1
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java7
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java4
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerUpgradesTest.java6
5 files changed, 12 insertions, 16 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
index 4e4fddf9..935cb11d 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
@@ -567,8 +567,7 @@ public class MavenDroolsController implements DroolsController {
if (feature.beforeDeliver(this, sink, event)) {
return true;
}
- }
- catch (Exception e) {
+ } catch (Exception e) {
logger.error("{}: feature {} before-deliver failure because of {}", this, feature.getClass().getName(),
e.getMessage(), e);
}
@@ -604,8 +603,7 @@ public class MavenDroolsController implements DroolsController {
if (feature.afterDeliver(this, sink, event, json, success)) {
return true;
}
- }
- catch (Exception e) {
+ } catch (Exception e) {
logger.error("{}: feature {} after-deliver failure because of {}", this, feature.getClass().getName(),
e.getMessage(), e);
}
@@ -748,10 +746,10 @@ public class MavenDroolsController implements DroolsController {
}
@Override
- public Map<String,Integer> factClassNames(String sessionName) {
+ public Map<String, Integer> factClassNames(String sessionName) {
validateSessionName(sessionName);
- Map<String,Integer> classNames = new HashMap<>();
+ Map<String, Integer> classNames = new HashMap<>();
PolicySession session = getSession(sessionName);
KieSession kieSession = session.getKieSession();
diff --git a/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java b/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java
index ab19a898..02a1a81b 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java
@@ -32,7 +32,6 @@ import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Properties;
-
import java.util.function.BiPredicate;
import org.onap.policy.drools.properties.DroolsPropertyConstants;
import org.onap.policy.drools.utils.PropertyUtil;
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java b/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java
index cb526e04..6956a45e 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java
@@ -21,7 +21,6 @@
package org.onap.policy.drools.system;
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -45,13 +44,13 @@ class IndexedPolicyControllerFactory implements PolicyControllerFactory {
/**
* Policy Controller Name Index.
*/
- private final HashMap<String,PolicyController> policyControllers =
+ private final HashMap<String, PolicyController> policyControllers =
new HashMap<>();
/**
* Group/Artifact Ids Index.
*/
- private final HashMap<String,PolicyController> coordinates2Controller =
+ private final HashMap<String, PolicyController> coordinates2Controller =
new HashMap<>();
/**
@@ -295,7 +294,7 @@ class IndexedPolicyControllerFactory implements PolicyControllerFactory {
}
synchronized (this) {
- String key = toKey(groupId,artifactId);
+ String key = toKey(groupId, artifactId);
if (this.coordinates2Controller.containsKey(key)) {
return this.coordinates2Controller.get(key);
} else {
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
index 5ab06b37..b58bcf5b 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
@@ -829,7 +829,7 @@ class PolicyEngineManager implements PolicyEngine {
}
private <T> void attempt(AtomicReference<Boolean> success, List<T> items, PredicateWithEx<T> pred,
- BiConsumer<T,Exception> handleEx) {
+ BiConsumer<T, Exception> handleEx) {
for (T item : items) {
try {
@@ -848,7 +848,7 @@ class PolicyEngineManager implements PolicyEngine {
}
private <T> void applyAll(List<T> items, Consumer<T> function,
- BiConsumer<T,Exception> handleEx) {
+ BiConsumer<T, Exception> handleEx) {
for (T item : items) {
try {
diff --git a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerUpgradesTest.java b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerUpgradesTest.java
index aa4b2c61..db2062f4 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerUpgradesTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerUpgradesTest.java
@@ -187,7 +187,7 @@ public class MavenDroolsControllerUpgradesTest {
controller.getContainer()
.getPolicySession(KBSESSION_RULES)
.getKieSession()
- .addEventListener( new RuleRuntimeEventListener() {
+ .addEventListener(new RuleRuntimeEventListener() {
@Override
public void objectInserted(ObjectInsertedEvent objectInsertedEvent) {
logger.info("RULE {}: inserting {}",
@@ -205,7 +205,7 @@ public class MavenDroolsControllerUpgradesTest {
logger.info("RULE {}: deleting {}",
objectDeletedEvent.getRule().getName(), objectDeletedEvent.getOldObject());
}
- } );
+ });
controller.getContainer()
.getPolicySession(KBSESSION_RULES)
@@ -265,6 +265,6 @@ public class MavenDroolsControllerUpgradesTest {
public void afterRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent ruleFlowGroupDeactivatedEvent) {
/* do nothing */
}
- } );
+ });
}
}