diff options
author | Magnusen, Drew (dm741q) <dm741q@att.com> | 2017-08-11 13:19:34 -0500 |
---|---|---|
committer | Magnusen, Drew (dm741q) <dm741q@att.com> | 2017-08-15 08:58:28 -0500 |
commit | d1077082cafafdd275aa8e210cf5f430ec11934d (patch) | |
tree | d42af9f948cb583af4be6ecc5fa661d4ac313771 /integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java | |
parent | 8e9b3d288bc5b51f691183715d5862489f09d95d (diff) |
Resolve major/critical issues in integrity-monitor
Resolved major and critical sonar issues in integrity-monitor
module.
Issue-ID: [POLICY-96]
Change-Id: If1da196134a73535668d42f429d647fc819ecaee
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
Diffstat (limited to 'integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java')
-rw-r--r-- | integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/JmxAgentConnection.java | 10 |
1 files changed, 1 insertions, 9 deletions
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 7a7e9a80..9b9bc48c 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 @@ -47,17 +47,10 @@ public final class JmxAgentConnection { private JMXConnector connector; private String jmxUrl = null; - //private final static Logger Log = Logger.getLogger(JmxAgentConnection.class); - /** * Set up the host/port from the properties. Use defaults if missing from the properties. * @param properties the properties used to look for host and port */ - //JmxAgentConnection(Properties properties) { - //host = properties.getProperty("jmxAgent.host", DEFAULT_HOST); - //port = properties.getProperty("jmxAgent.port", DEFAULT_PORT); - //} - public JmxAgentConnection() { host = DEFAULT_HOST; port = DEFAULT_PORT; @@ -98,7 +91,7 @@ public final class JmxAgentConnection { else { url = new JMXServiceURL(jmxUrl); } - Map<String, Object> env = new HashMap<String, Object>(); + Map<String, Object> env = new HashMap<>(); connector = JMXConnectorFactory.newJMXConnector(url, env); connector.connect(); @@ -110,7 +103,6 @@ public final class JmxAgentConnection { Notification notification, Object handback) { if (notification.getType().equals( JMXConnectionNotification.FAILED)) { - //Log.debug("JMXAgent connection failure"); // handle disconnect disconnect(); } |