aboutsummaryrefslogtreecommitdiffstats
path: root/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/ComponentAdminException.java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-01-31 18:10:34 -0500
committerJim Hahn <jrh3@att.com>2018-02-01 10:50:48 -0500
commit0f51fa4e072aeb29f4e323cb6013fb4a873aae5c (patch)
tree1f0b28eea283e367725980e3e22acfaf89e628e2 /integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/ComponentAdminException.java
parent9c978cea0a5af3d4a9d587a5f09b88d660bd498b (diff)
Fix sonar generic Exceptions in policy/common
IntegrityMonitor.java: Renamed variables, Ex: dep_groups => depGroups. Renamed enum constants, Ex: pdp_xacml => PDP_XACML. Merged "if" tests. Cast values to "long" before multiplying. Re-throw interrupt(). Write exception via logger instead of e.printStackTrace(). Moved constructor to top of the file. Removed most logger.isDebugEnabled() checks. Returned generic List instead of ArrayList. Used entrySet() instead of keySet(). Removed useless parentheses. Removed superfluous exceptions from "throws" declaration. DbAudit.java: Modified DbAudit to throw DbAuditException. Replaced references to HashSet and HashMap with generic Set and Map. Modified DbAudit to iterate over entrySet() instead of keySet(). ComponentAdminException: Created ComponentAdminException class. Modified ComponentAdmin methods to throw new exception class. Extracted "stateManager" String constant. Eliminated logger.isDebugEnabled() calls. Updated the license data. Eliminated double-checked locking problem from PropertyUtil: Modified code to use Initialization On Demand Holder idiom. Change-Id: Ic01288542041da26df483ce85ecaf292ac138f85 Issue-ID: POLICY-246 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/ComponentAdminException.java')
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/ComponentAdminException.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/ComponentAdminException.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/ComponentAdminException.java
new file mode 100644
index 00000000..e98288eb
--- /dev/null
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/jmx/ComponentAdminException.java
@@ -0,0 +1,42 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Integrity Audit
+ * ================================================================================
+ * Copyright (C) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.common.im.jmx;
+
+public class ComponentAdminException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public ComponentAdminException() {
+ super();
+ }
+
+ public ComponentAdminException(String message) {
+ super(message);
+ }
+
+ public ComponentAdminException(Throwable cause) {
+ super(cause);
+ }
+
+ public ComponentAdminException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}