aboutsummaryrefslogtreecommitdiffstats
path: root/feature-healthcheck/src/main/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-02-19 16:56:06 -0500
committerJim Hahn <jrh3@att.com>2018-02-20 09:59:15 -0500
commita45f8909871dc1ddb75845f067a602951afc8d11 (patch)
treefa72aff7ceede971d4e6922f62a503a8ee8924d5 /feature-healthcheck/src/main/java
parent1708e9a45cb88571613c10b68d392811b2b3f0f4 (diff)
Sonar fixes to drools-pdp
Fixed most of the instances of the following sonar issues: Moved array designator Used diamond operator Changed System.out/err to use a logger Changed several Thread.sleep() in test code to a single sleep() Useless assignments Replaced comparison with "" to string.isEmpty() Merged if's Replaced ArrayList with List in method returns Reordered type modifiers Reordered constructor methods Defined constants for literals, or replaced them with method calls Removed "throws Xxx" for subclasses of RuntimeException Combined identical "catch" blocks Re-interrupted the current thread after catching an InterruptedException Removed tests against the literal "false" Fix indentation of new makeTopicOperError() method. Fix exception variable name in new methods, logNoUebEncoder() and logNoDmaapEncoder(). Change-Id: Iddae5210553662f733b67333b372dec8c3fe2c94 Issue-ID: POLICY-336 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-healthcheck/src/main/java')
-rw-r--r--feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java
index bdb15a70..8fa6dfab 100644
--- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java
+++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java
@@ -1,8 +1,8 @@
-/*-
+/*
* ============LICENSE_START=======================================================
* feature-healthcheck
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,11 @@ import org.slf4j.LoggerFactory;
* Healthcheck
*/
public interface HealthCheck extends Startable {
+
+ /**
+ * Healthcheck Monitor
+ */
+ public static final HealthCheck monitor = new HealthCheckMonitor();
/**
* Healthcheck Report
@@ -156,7 +161,7 @@ public interface HealthCheck extends Startable {
return details;
}
- public void setDetails(ArrayList<Report> details) {
+ public void setDetails(List<Report> details) {
this.details = details;
}
}
@@ -166,11 +171,6 @@ public interface HealthCheck extends Startable {
* @return a report
*/
public Reports healthCheck();
-
- /**
- * Healthcheck Monitor
- */
- public static final HealthCheck monitor = new HealthCheckMonitor();
}
/**
@@ -243,7 +243,7 @@ class HealthCheckMonitor implements HealthCheck {
* {@inheritDoc}
*/
@Override
- public boolean start() throws IllegalStateException {
+ public boolean start() {
try {
this.healthCheckProperties = SystemPersistence.manager.getProperties(HealthCheckFeature.CONFIGURATION_PROPERTIES_NAME);
@@ -265,7 +265,7 @@ class HealthCheckMonitor implements HealthCheck {
* {@inheritDoc}
*/
@Override
- public boolean stop() throws IllegalStateException {
+ public boolean stop() {
for (HttpServletServer server : servers) {
try {
@@ -290,7 +290,7 @@ class HealthCheckMonitor implements HealthCheck {
* {@inheritDoc}
*/
@Override
- public void shutdown() throws IllegalStateException {
+ public void shutdown() {
this.stop();
}