aboutsummaryrefslogtreecommitdiffstats
path: root/integrity-monitor/src
diff options
context:
space:
mode:
Diffstat (limited to 'integrity-monitor/src')
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/jpa/ResourceRegistrationEntity.java3
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java4
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java2
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java10
4 files changed, 8 insertions, 11 deletions
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/jpa/ResourceRegistrationEntity.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/jpa/ResourceRegistrationEntity.java
index a771ba09..3ee607f2 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/jpa/ResourceRegistrationEntity.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/jpa/ResourceRegistrationEntity.java
@@ -3,7 +3,7 @@
* Integrity Monitor
* ================================================================================
* Copyright (C) 2017-2018, 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@ import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
-import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;
import java.io.Serial;
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java
index 3c071f18..f866df47 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java
@@ -559,7 +559,7 @@ class IntegrityMonitorTest extends IntegrityMonitorTestBase {
@SuppressWarnings("rawtypes")
List resourceList = query.getResultList();
if (resourceList.isEmpty()) {
- logger.debug("Record not found, resourceName: " + resourceName);
+ logger.debug("Record not found, resourceName: {}", resourceName);
fail("missing record");
}
@@ -626,7 +626,7 @@ class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.HOT_STANDBY, sme1.getStandbyStatus());
logger.debug("--");
} else {
- logger.debug("Record not found, resourceName: " + resourceName);
+ logger.debug("Record not found, resourceName: {}", resourceName);
fail("record not found");
}
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java
index 2670b704..266b3221 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java
@@ -73,7 +73,7 @@ class StateManagementEntityTest extends IntegrityMonitorTestBase {
}
@Test
- void testJpa() throws Exception {
+ void testJpa() {
logger.debug("\n??? logger.infor StateManagementEntityTest: Entering\n\n");
// Define the resourceName for the StateManagement constructor
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
index f43322de..5dfd01f3 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
@@ -99,7 +99,7 @@ class StateManagementTest extends IntegrityMonitorTestBase {
logger.info("\n\nStateManagementTest: Exit\n\n");
}
- private void test_1(final StateManagement sm) throws StateManagementException, IntegrityMonitorException {
+ private void test_1(final StateManagement sm) throws IntegrityMonitorException {
logger.info("\n??? initial state");
assertEquals(UNLOCKED_ENABLED_NULL_NULL, makeString(sm));
@@ -167,7 +167,7 @@ class StateManagementTest extends IntegrityMonitorTestBase {
assertEquals(UNLOCKED_ENABLED_NULL_HOTSTANDBY, makeString(sm2));
}
- private void test_2(final StateManagement sm) throws StateManagementException, IntegrityMonitorException {
+ private void test_2(final StateManagement sm) throws IntegrityMonitorException {
// D3 If demote() is called while standbyStatus is null and
// adminState is locked or opState is disabled,
// the state shall transition to coldstandby
@@ -231,8 +231,7 @@ class StateManagementTest extends IntegrityMonitorTestBase {
@Test
@SuppressWarnings("unchecked")
- void test_StateManagementInitialization_ThrowException_ifEntityManagerCreateQuerythrowsAnyException()
- throws Exception {
+ void test_StateManagementInitialization_ThrowException_ifEntityManagerCreateQuerythrowsAnyException() {
assertThatThrownBy(() -> {
final EntityManager mockedEm = getMockedEntityManager();
final EntityManagerFactory mockedEmf = getMockedEntityManagerFactory(mockedEm);
@@ -246,8 +245,7 @@ class StateManagementTest extends IntegrityMonitorTestBase {
@Test
@SuppressWarnings("unchecked")
- void test_StateManagementInitialization_ThrowStateManagementException_ifEntityManagerThrowsAnyException()
- throws Exception {
+ void test_StateManagementInitialization_ThrowStateManagementException_ifEntityManagerThrowsAnyException() {
assertThatThrownBy(() -> {
final EntityManager mockedEm = getMockedEntityManager();
final EntityManagerFactory mockedEmf = getMockedEntityManagerFactory(mockedEm);