aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-09-14 13:49:52 -0400
committerPamela Dragosh <pdragosh@research.att.com>2017-09-15 09:51:44 -0400
commitefdb9a5148dfda3c0c0275134da42d96674490fb (patch)
treeebb18b3a3249b6e6f45ecd7f8697e124ead3e75f /policy-management/src
parent7ca599cb444c3896beb9318c90a460adb1f276b9 (diff)
Fix sonar related to persistence-feature
Sonar blocker for catchable: I am not sure why this is wrapped with an exception. Changing try-catch to use Exception | LinkageError per Jorge/Ralph. Sonar critical for logging exceptions. Sonar critical for casting to Long and reinterrupting thread. Change-Id: I44d46f005d9aa30c434c22e479034107055277ce Issue-ID: POLICY-195 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'policy-management/src')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java2
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java1
2 files changed, 2 insertions, 1 deletions
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 5ac17253..e217ee7d 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
@@ -164,7 +164,7 @@ public class FileSystemPersistence implements SystemPersistence {
this.backupController(controllerName);
}
} catch (final Exception e) {
- logger.info("{}: no existing {} properties", this, controllerName);
+ logger.info("{}: no existing {} properties {}", this, controllerName, e);
// continue
}
}
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
index a6f79374..b2b2df6d 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
@@ -998,6 +998,7 @@ class PolicyEngineManager implements PolicyEngine {
Thread.sleep(5000L);
} catch (final InterruptedException e) {
logger.warn("{}: interrupted-exception while shutting down management server: ", this);
+ Thread.currentThread().interrupt();
}
System.exit(0);