summaryrefslogtreecommitdiffstats
path: root/api-state-management/src/main/java/org
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-31 08:22:13 -0400
committerJim Hahn <jrh3@att.com>2020-08-31 10:15:07 -0400
commitd5c365f60e492e37a361654974eba1719146bdc2 (patch)
treef717c2198c1aebe0cc03a5d3e9aec653d0d73807 /api-state-management/src/main/java/org
parent7dc71c3d0aedb322aff0cdaaa84340354c41b089 (diff)
Fix more sonars in drools-pdp
Fixed more sonars in drools-pdp: - remove commented code - don't throw generic Exception - unused field (made it protected instead of private) - log conditionally - cognitive complexity - too many break/continue - return empty list instead of null - Random() is not secure Fixed more eclipse warnings: - parameterize generic types Issue-ID: POLICY-2616-sonars3 Change-Id: Ia5ad769b2ea763568cfae3d81807926d89153b09 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'api-state-management/src/main/java/org')
-rw-r--r--api-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeatureApi.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/api-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeatureApi.java b/api-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeatureApi.java
index c267968c..c4ba8622 100644
--- a/api-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeatureApi.java
+++ b/api-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeatureApi.java
@@ -23,7 +23,9 @@ package org.onap.policy.drools.statemanagement;
import javax.validation.constraints.NotNull;
import org.onap.policy.common.capabilities.Lockable;
import org.onap.policy.common.im.AllSeemsWellException;
+import org.onap.policy.common.im.IntegrityMonitorException;
import org.onap.policy.common.im.StateChangeNotifier;
+import org.onap.policy.common.im.StateManagementException;
import org.onap.policy.common.utils.services.OrderedService;
/**
@@ -105,18 +107,18 @@ public interface StateManagementFeatureApi extends OrderedService, Lockable {
* will take a value of coldstandby.
*
* @param resourceName resource name
- * @throws Exception exception
+ * @throws StateManagementException exception
*/
- void disableFailed(String resourceName) throws Exception;
+ void disableFailed(String resourceName) throws StateManagementException;
/**
* This method moves the X.731 Operational State for this resource into a value of disabled and
* the Availability Status to a value of failed. As a consequence the Standby Status value will
* take a value of coldstandby.
*
- * @throws Exception exception
+ * @throws StateManagementException exception
*/
- void disableFailed() throws Exception;
+ void disableFailed() throws StateManagementException;
/**
* This method moves the X.731 Standby Status for this resource from hotstandby to
@@ -124,18 +126,18 @@ public interface StateManagementFeatureApi extends OrderedService, Lockable {
* value is null, it will move to providingservice assuming the Operational State is enabled and
* Administrative State is unlocked.
*
- * @throws Exception exception
+ * @throws IntegrityMonitorException exception
*/
- void promote() throws Exception;
+ void promote() throws IntegrityMonitorException;
/**
* This method moves the X.731 Standby Status for this resource from providingservice to
* hotstandby. If the current value is null, it will move to hotstandby assuming the Operational
* State is enabled and Administrative State is unlocked. Else, it will move to coldstandby
*
- * @throws Exception exception
+ * @throws StateManagementException exception
*/
- void demote() throws Exception;
+ void demote() throws StateManagementException;
/**
* Returns the resourceName associated with this instance of the