summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/test/java
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-08-07 16:01:21 -0400
committeradheli.tavares <adheli.tavares@est.tech>2023-09-22 16:08:11 +0100
commit396f60280265a37379916ad12752a94691118f65 (patch)
tree4b6d54a1567482a89bc471577c6efe484f6dadd8 /feature-lifecycle/src/test/java
parentd6f6ebc925506cdf18b903df2cd3cbcef311082d (diff)
Upgrade java-17 in drools-pdp
Issue-ID: POLICY-4676 Change-Id: I85a0f6303b30cd0405d63be003c9288f59a9d6b7 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'feature-lifecycle/src/test/java')
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/ControllerSupport.java6
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java1
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java6
3 files changed, 4 insertions, 9 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/ControllerSupport.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/ControllerSupport.java
index 4c1830b8..4e0b4bf7 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/ControllerSupport.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/ControllerSupport.java
@@ -135,14 +135,10 @@ public class ControllerSupport {
* Change final marker in static field.
*/
public static <T> Field unsetFinalStaticAccess(Class<T> clazz, String fieldName)
- throws NoSuchFieldException, IllegalAccessException {
+ throws NoSuchFieldException {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
- Field modifiers = Field.class.getDeclaredField("modifiers");
- modifiers.setAccessible(true);
- modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
-
return field;
}
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java
index c08ac9fe..e5fc13a8 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java
@@ -202,7 +202,6 @@ public class LifecycleFsmTest {
assertEquals("foo", fsm.getPdpType());
}
-
@Test
public void testMergePolicies() {
assertEquals(List.of(), fsm.getActivePolicies());
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
index 85294306..29ef5a77 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
@@ -25,15 +25,15 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response.Status;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
import org.apache.commons.lang3.StringUtils;
import org.junit.After;
import org.junit.Before;