aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-02-01 14:17:30 -0500
committerPamela Dragosh <pdragosh@research.att.com>2018-02-01 14:17:39 -0500
commitc23099a762c165ca8d1fd064902e91191952f678 (patch)
tree78b11b7c369a231282120b4da4108510b74fa874
parent0f51fa4e072aeb29f4e323cb6013fb4a873aae5c (diff)
Addressing technical debt integrity-monitor
Issue-ID: POLICY-457 Change-Id: I6e4bc00bc85f73bcb4c58c54378f062d98e6876d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/AdministrativeStateException.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/ForwardProgressException.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java16
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorException.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorPropertiesException.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/StandbyStatusException.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/StateElement.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagementException.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java2
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransitionException.java1
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java4
11 files changed, 18 insertions, 12 deletions
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/AdministrativeStateException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/AdministrativeStateException.java
index 048124ba..31be3cea 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/AdministrativeStateException.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/AdministrativeStateException.java
@@ -23,6 +23,7 @@ package org.onap.policy.common.im;
public class AdministrativeStateException extends Exception{
private static final long serialVersionUID = 1L;
public AdministrativeStateException() {
+ super();
}
public AdministrativeStateException(String message) {
super(message);
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/ForwardProgressException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/ForwardProgressException.java
index 6f54cc9a..fd545cda 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/ForwardProgressException.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/ForwardProgressException.java
@@ -23,6 +23,7 @@ package org.onap.policy.common.im;
public class ForwardProgressException extends Exception{
private static final long serialVersionUID = 1L;
public ForwardProgressException() {
+ super();
}
public ForwardProgressException(String message) {
super(message);
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java
index 4a09d66d..17223ba3 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java
@@ -1157,8 +1157,8 @@ public class IntegrityMonitor {
* allow the the forward progress counter to advance.
*/
String msg = "allNotWellMap:";
- for(String key: allNotWellMap.keySet()){
- msg = msg.concat("\nkey = " + key + " msg = " + allNotWellMap.get(key));
+ for(Entry<String, String> entry: allNotWellMap.entrySet()){
+ msg = msg.concat("\nkey = " + entry.getKey() + " msg = " + entry.getValue());
}
logger.error("endTransaction: allNotWellMap is NOT EMPTY. Not advancing forward"
+ "progress counter. \n{}\n", msg);
@@ -1168,8 +1168,8 @@ public class IntegrityMonitor {
if(getAllSeemsWellMap() != null){
if(!(getAllSeemsWellMap().isEmpty())){
String msg = "allSeemsWellMap:";
- for(String key: allSeemsWellMap.keySet()){
- msg = msg.concat("\nkey = " + key + " msg = " + allSeemsWellMap.get(key));
+ for(Entry<String, String> entry: allSeemsWellMap.entrySet()){
+ msg = msg.concat("\nkey = " + entry.getKey() + " msg = " + entry.getValue());
}
logger.debug("endTransaction: allNotWellMap IS EMPTY and allSeemsWellMap is NOT EMPTY. Advancing forward"
+ "progress counter. \n{}\n", msg);
@@ -1941,11 +1941,11 @@ public class IntegrityMonitor {
}
if(logger.isDebugEnabled()){
- for(Entry<String, String> ent: allSeemsWellMap.entrySet()) {
- logger.debug("allSeemsWellMap: key = {} msg = {}", ent.getKey(), ent.getValue());
+ for(Entry<String, String> entry: allSeemsWellMap.entrySet()){
+ logger.debug("allSeemsWellMap: key = {} msg = {}", entry.getKey(), entry.getValue());
}
- for(Entry<String, String> ent: allNotWellMap.entrySet()) {
- logger.debug("allNotWellMap: key = {} msg = {}", ent.getKey(), ent.getValue());
+ for(Entry<String, String> entry: allNotWellMap.entrySet()){
+ logger.debug("allNotWellMap: key = {} msg = {}", entry.getKey(), entry.getValue());
}
logger.debug("allSeemsWell exit");
}
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorException.java
index 95b0a750..072af236 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorException.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorException.java
@@ -23,6 +23,7 @@ package org.onap.policy.common.im;
public class IntegrityMonitorException extends Exception{
private static final long serialVersionUID = 1L;
public IntegrityMonitorException() {
+ super();
}
public IntegrityMonitorException(String message) {
super(message);
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorPropertiesException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorPropertiesException.java
index 1d56e28a..24a3aeb2 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorPropertiesException.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitorPropertiesException.java
@@ -23,6 +23,7 @@ package org.onap.policy.common.im;
public class IntegrityMonitorPropertiesException extends Exception{
private static final long serialVersionUID = 1L;
public IntegrityMonitorPropertiesException() {
+ super();
}
public IntegrityMonitorPropertiesException(String message) {
super(message);
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/StandbyStatusException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/StandbyStatusException.java
index 787030d4..b871c9f5 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/StandbyStatusException.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/StandbyStatusException.java
@@ -28,6 +28,7 @@ public class StandbyStatusException extends Exception {
public StandbyStatusException()
{
+ super();
}
public StandbyStatusException(String message)
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateElement.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateElement.java
index e38971ea..fd5afc6a 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateElement.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateElement.java
@@ -40,6 +40,7 @@ public class StateElement {
public StateElement()
{
+ // Empty constructor
}
public String getAdminState()
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagementException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagementException.java
index daebed91..7591c1a8 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagementException.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagementException.java
@@ -23,6 +23,7 @@ package org.onap.policy.common.im;
public class StateManagementException extends Exception{
private static final long serialVersionUID = 1L;
public StateManagementException() {
+ super();
}
public StateManagementException(String message) {
super(message);
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java
index 3f690187..a7f2d0ed 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java
@@ -143,7 +143,7 @@ public class StateTransition {
if (value != null) {
try {
- String parts[] = value.split(",", 5);
+ String[] parts = value.split(",", 5);
stateElement.setEndingAdminState(parts[0].trim());
stateElement.setEndingOpState(parts[1].trim());
stateElement.setEndingAvailStatus(parts[2].trim().replace(".", ","));
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransitionException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransitionException.java
index 07a4326f..3945ddcc 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransitionException.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransitionException.java
@@ -23,6 +23,7 @@ package org.onap.policy.common.im;
public class StateTransitionException extends Exception{
private static final long serialVersionUID = 1L;
public StateTransitionException() {
+ super();
}
public StateTransitionException(String message) {
super(message);
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java
index 091f2d57..d15fc5e7 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java
@@ -79,10 +79,8 @@ public final class JmxAgentConnection {
*/
private static String jmxAgentUrl(String host, String port) {
- String url = "service:jmx:rmi:///jndi/rmi://" + host + ":" + port
+ return "service:jmx:rmi:///jndi/rmi://" + host + ":" + port
+ "/jmxrmi";
-
- return url;
}
/**