policy/drools-pdp jdk11 upgrades 64/100264/1
authorHockla, Ali (ah999m) <ah999m@att.com>
Mon, 13 Jan 2020 20:11:46 +0000 (14:11 -0600)
committerHockla, Ali (ah999m) <ah999m@att.com>
Mon, 13 Jan 2020 20:12:07 +0000 (14:12 -0600)
Issue-ID: POLICY-1589
Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
51 files changed:
api-active-standby-management/pom.xml
api-state-management/pom.xml
feature-active-standby-management/pom.xml
feature-distributed-locking/pom.xml
feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
feature-drools-init/pom.xml
feature-drools-init/src/test/java/org/onap/policy/drools/droolsinit/DroolsInitFeatureTest.java
feature-eelf/src/test/java/org/onap/policy/drools/eelf/test/EElfTest.java
feature-healthcheck/pom.xml
feature-lifecycle/pom.xml
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
feature-mdc-filters/pom.xml
feature-mdc-filters/src/test/java/org/onap/policy/drools/mdc/filters/MdcTopicFilterTest.java
feature-pooling-dmaap/pom.xml
feature-session-persistence/pom.xml
feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java
feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnectorTest.java
feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java
feature-simulators/pom.xml
feature-state-management/pom.xml
feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java
feature-test-transaction/pom.xml
feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionAdditionalTest.java
feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java
policy-core/pom.xml
policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java
policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java
policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionTest.java
policy-core/src/test/java/org/onap/policy/drools/core/lock/LockImplTest.java
policy-core/src/test/java/org/onap/policy/drools/util/KieUtilsTest.java
policy-management/pom.xml
policy-management/src/main/java/org/onap/policy/drools/system/Main.java
policy-management/src/test/java/org/onap/policy/drools/controller/DroolsControllerFactoryTest.java
policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsController2Test.java
policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.java
policy-management/src/test/java/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.java
policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java
policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java
policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java
policy-management/src/test/java/org/onap/policy/drools/system/internal/FeatureLockImplTest.java
policy-management/src/test/java/org/onap/policy/drools/system/internal/LockManagerTest.java
policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerTest.java
policy-utils/pom.xml
policy-utils/src/test/java/org/onap/policy/drools/utils/PairTripleTest.java
policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java
policy-utils/src/test/java/org/onap/policy/drools/utils/logging/MdcTransactionTest.java
pom.xml

index 25074a7..13cf69e 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ECOMP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017, 2019-2020 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.
   <name>api-active-standby-management</name>
   <description>API for Active Standby Management feature</description>
 
-  <properties>
-          <maven.compiler.source>1.8</maven.compiler.source>
-          <maven.compiler.target>1.8</maven.compiler.target>
-  </properties>
-
   <dependencies>
     <dependency>
       <groupId>org.onap.policy.drools-pdp</groupId>
@@ -63,7 +58,7 @@
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
index 7ede769..cf54e4f 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017, 2019-2020 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.
@@ -34,8 +34,6 @@
   <description>Separately loadable module for state management APIe</description>
 
   <properties>
-          <maven.compiler.source>1.8</maven.compiler.source>
-          <maven.compiler.target>1.8</maven.compiler.target>
           <swagger.version>1.5.0</swagger.version>
   </properties>
 
@@ -75,7 +73,7 @@
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
index 80dedac..eb51ae7 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   feature-active-standby-management
   ================================================================================
-  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2020 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.
@@ -94,7 +94,7 @@
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
index 1b6063b..5009504 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2018-2020 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.
     <name>feature-distributed-locking</name>
     <description>Loadable module that provides distributed locking capability</description>
 
-    <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
-    </properties>
-
     <build>
         <plugins>
             <plugin>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 5351f00..065795b 100644 (file)
@@ -29,10 +29,10 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
index 6694d8a..705a12f 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2019-2020 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.
@@ -73,7 +73,7 @@
 
     <dependency>
       <groupId>org.powermock</groupId>
-      <artifactId>powermock-api-mockito</artifactId>
+      <artifactId>powermock-api-mockito2</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index 36e6496..28b4d5e 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-drools-init
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -22,7 +22,7 @@ package org.onap.policy.drools.droolsinit;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -85,7 +85,7 @@ public class DroolsInitFeatureTest {
     }
 
     @Test
-    public void initTest() {
+    public void testInit() {
         FactHandle factHandle = mock(FactHandle.class);
         when(kieSession.insert(any())).thenReturn(factHandle);
         when(kieSession.getObject(factHandle)).thenReturn(new Object());
index 271fd4a..c0f271c 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-eelf
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 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.
@@ -84,7 +84,7 @@ public class EElfTest {
     }
 
     @Test
-    public void slf4jLog() {
+    public void testSlf4jLog() {
 
         /* standard slf4j using defaults */
 
index abcf290..47d389a 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2020 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.
     <name>feature-healthcheck</name>
     <description>Loadable module that performs remote system healthchecks</description>
 
-    <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
-    </properties>
-
     <build>
         <plugins>
             <plugin>
@@ -99,7 +94,7 @@
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 66da461..b57847a 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP
   ================================================================================
-  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2019-2020 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.
     <name>feature-lifecycle</name>
     <description>Loadable module to support the lifecycle modes</description>
 
-    <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
-    </properties>
-
     <build>
         <plugins>
             <plugin>
 
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
 
index 2a25830..7fc7fd2 100644 (file)
@@ -84,7 +84,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void start() {
+    public void testStart() {
         assertActive();
         assertFalse(fsm.start());
         assertActive();
@@ -101,7 +101,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void stop() {
+    public void testStop() {
         assertTrue(fsm.stop());
         assertBasicTerminated();
 
@@ -116,7 +116,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void shutdown() {
+    public void testShutdown() {
         fsm.shutdown();
 
         assertBasicTerminated();
@@ -126,7 +126,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void status() {
+    public void testStatus() {
         waitUntil(fsm.getStatusTimerSeconds() + 1, TimeUnit.SECONDS, isStatus(PdpState.ACTIVE));
         int preCount = fsm.client.getSink().getRecentEvents().length;
 
@@ -142,7 +142,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void stateChange() throws CoderException {
+    public void testStateChange() throws CoderException {
         assertActive();
 
         /* no name and mismatching group info */
@@ -179,7 +179,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void update() throws IOException, CoderException {
+    public void testUpdate() throws IOException, CoderException {
 
         // TODO: extract repeated similar assertion blocks into their own helper methods
 
index f242e4c..60d71d0 100644 (file)
@@ -71,7 +71,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void controller() {
+    public void testController() {
         fsm.start(controllerSupport.getController());
         assertSame(controllerSupport.getController(),
                         fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE,
@@ -85,7 +85,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void start() {
+    public void testStart() {
         assertEquals(0, fsm.client.getSink().getRecentEvents().length);
         assertFalse(fsm.start());
         assertBasicPassive();
@@ -110,7 +110,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void shutdown() throws Exception {
+    public void testShutdown() throws Exception {
         simpleStop();
 
         fsm.shutdown();
@@ -118,7 +118,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void status() {
+    public void testStatus() {
         assertTrue(fsm.client.getSink().isAlive());
         assertTrue(fsm.status());
         assertSame(0, fsm.client.getSink().getRecentEvents().length);
@@ -139,7 +139,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void update() throws IOException, CoderException {
+    public void testUpdate() throws IOException, CoderException {
         controllerSupport.getController().getDrools().delete(ToscaPolicy.class);
         assertEquals(0, controllerSupport.getController().getDrools().factCount("junits"));
 
@@ -240,7 +240,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
     }
 
     @Test
-    public void stateChange() throws CoderException, IOException {
+    public void testStateChange() throws CoderException, IOException {
         /* no name */
         PdpStateChange change = new PdpStateChange();
         change.setPdpGroup("A");
index 353525d..7c94e52 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -57,7 +57,7 @@ public class LifecycleStateTerminatedTest {
     }
 
     @Test
-    public void constructor() {
+    public void testConstructor() {
         assertThatIllegalArgumentException().isThrownBy(() -> new LifecycleStateTerminated(null));
 
         LifecycleState state = new LifecycleStateTerminated(new LifecycleFsm());
@@ -71,7 +71,7 @@ public class LifecycleStateTerminatedTest {
     }
 
     @Test
-    public void stop() {
+    public void testStop() {
         assertEquals(PdpState.TERMINATED, fsm.state.state());
         assertFalse(fsm.isAlive());
 
@@ -89,7 +89,7 @@ public class LifecycleStateTerminatedTest {
     }
 
     @Test
-    public void bounce() {
+    public void testBounce() {
         assertBasicTerminated();
         simpleStart();
         simpleStop();
@@ -101,12 +101,12 @@ public class LifecycleStateTerminatedTest {
 
     @Test
     public void doubleBounce() {
-        bounce();
-        bounce();
+        testBounce();
+        testBounce();
     }
 
     @Test
-    public void doubleStartBounce() {
+    public void testDoubleStartBounce() {
         simpleStart();
         assertFalse(fsm.start());
         assertBasicPassive();
@@ -114,7 +114,7 @@ public class LifecycleStateTerminatedTest {
     }
 
     @Test
-    public void shutdown() {
+    public void testShutdown() {
         assertBasicTerminated();
         fsm.shutdown();
         assertBasicTerminated();
@@ -123,7 +123,7 @@ public class LifecycleStateTerminatedTest {
     }
 
     @Test
-    public void status() {
+    public void testStatus() {
         assertBasicTerminated();
         assertFalse(fsm.status());
         assertBasicTerminated();
@@ -136,7 +136,7 @@ public class LifecycleStateTerminatedTest {
     }
 
     @Test
-    public void update() {
+    public void testUpdate() {
         PdpUpdate update = new PdpUpdate();
         update.setName(NetworkUtil.getHostname());
         update.setPdpGroup("A");
@@ -151,7 +151,7 @@ public class LifecycleStateTerminatedTest {
     }
 
     @Test
-    public void stateChange() {
+    public void testStateChange() {
         PdpStateChange change = new PdpStateChange();
         change.setPdpGroup("A");
         change.setPdpSubgroup("a");
index da7435f..37be4ac 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -80,7 +80,7 @@ public class RestLifecycleManagerTest {
     }
 
     @Test
-    public void fsm() {
+    public void testFsm() {
         Response response = HttpClientFactoryInstance.getClientFactory().get("lifecycle").get("fsm");
         assertNotNull(HttpClient.getBody(response, String.class));
         assertEquals(Status.OK.getStatusCode(), response.getStatus());
index 89c09e3..a6580d2 100755 (executable)
-<!--\r
-  ============LICENSE_START=======================================================\r
-  feature-mdc-filters\r
-  ================================================================================\r
-  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-\r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ============LICENSE_END=========================================================\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <modelVersion>4.0.0</modelVersion>\r
-    <parent>\r
-        <artifactId>drools-pdp</artifactId>\r
-        <groupId>org.onap.policy.drools-pdp</groupId>\r
-        <version>1.6.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <artifactId>feature-mdc-filters</artifactId>\r
-\r
-    <name>feature-mdc-filters</name>\r
-    <description>Loadable module that marks key fields in messages through logback mdc.</description>\r
-\r
-    <properties>\r
-        <maven.compiler.source>1.8</maven.compiler.source>\r
-        <maven.compiler.target>1.8</maven.compiler.target>\r
-    </properties>\r
-\r
-    <build>\r
-        <plugins>\r
-            <plugin>\r
-                <artifactId>maven-assembly-plugin</artifactId>\r
-                <executions>\r
-                    <execution>\r
-                        <id>zipfile</id>\r
-                        <goals>\r
-                            <goal>single</goal>\r
-                        </goals>\r
-                        <phase>package</phase>\r
-                        <configuration>\r
-                            <attach>true</attach>\r
-                            <finalName>${project.artifactId}-${project.version}</finalName>\r
-                            <descriptors>\r
-                                <descriptor>src/assembly/assemble_zip.xml</descriptor>\r
-                            </descriptors>\r
-                            <appendAssemblyId>false</appendAssemblyId>\r
-                        </configuration>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-dependency-plugin</artifactId>\r
-                <executions>\r
-                    <execution>\r
-                        <id>copy-dependencies</id>\r
-                        <goals>\r
-                            <goal>copy-dependencies</goal>\r
-                        </goals>\r
-                        <phase>prepare-package</phase>\r
-                        <configuration>\r
-                            <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory>\r
-                            <overWriteReleases>false</overWriteReleases>\r
-                            <overWriteSnapshots>true</overWriteSnapshots>\r
-                            <overWriteIfNewer>true</overWriteIfNewer>\r
-                            <useRepositoryLayout>false</useRepositoryLayout>\r
-                            <addParentPoms>false</addParentPoms>\r
-                            <copyPom>false</copyPom>\r
-                            <includeScope>runtime</includeScope>\r
-                            <excludeTransitive>true</excludeTransitive>\r
-                        </configuration>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-\r
-    <dependencies>\r
-\r
-        <dependency>\r
-            <groupId>org.onap.policy.common</groupId>\r
-            <artifactId>policy-endpoints</artifactId>\r
-            <version>${policy.common.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.onap.policy.drools-pdp</groupId>\r
-            <artifactId>policy-management</artifactId>\r
-            <version>${project.version}</version>\r
-            <scope>provided</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.mockito</groupId>\r
-            <artifactId>mockito-core</artifactId>\r
-            <version>2.13.0</version>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>org.assertj</groupId>\r
-            <artifactId>assertj-core</artifactId>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-        <dependency>\r
-            <groupId>junit</groupId>\r
-            <artifactId>junit</artifactId>\r
-            <scope>test</scope>\r
-        </dependency>\r
-\r
-    </dependencies>\r
-</project>\r
+<!--
+  ============LICENSE_START=======================================================
+  feature-mdc-filters
+  ================================================================================
+  Copyright (C) 2019-2020 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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>drools-pdp</artifactId>
+        <groupId>org.onap.policy.drools-pdp</groupId>
+        <version>1.6.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>feature-mdc-filters</artifactId>
+
+    <name>feature-mdc-filters</name>
+    <description>Loadable module that marks key fields in messages through logback mdc.</description>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>zipfile</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <attach>true</attach>
+                            <finalName>${project.artifactId}-${project.version}</finalName>
+                            <descriptors>
+                                <descriptor>src/assembly/assemble_zip.xml</descriptor>
+                            </descriptors>
+                            <appendAssemblyId>false</appendAssemblyId>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
+                            <useRepositoryLayout>false</useRepositoryLayout>
+                            <addParentPoms>false</addParentPoms>
+                            <copyPom>false</copyPom>
+                            <includeScope>runtime</includeScope>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>policy-endpoints</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onap.policy.drools-pdp</groupId>
+            <artifactId>policy-management</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+</project>
index 7fd65a2..e1a9b9b 100755 (executable)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-mdc-filters
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -310,7 +310,7 @@ public class MdcTopicFilterTest {
     }
 
     @Test
-    public void modifyFilterRuleMultiPathExceptionTest() {
+    public void testModifyFilterRuleMultiPathException() {
         MdcTopicFilter filter = new MdcTopicFilter("abc=$a.value");
         assertThatIllegalArgumentException()
                         .isThrownBy(() -> filter.modifyFilterRule("def", "abc", Arrays.asList("$.b", "$.c")))
@@ -562,7 +562,7 @@ public class MdcTopicFilterTest {
     }
 
     @Test
-    public void findAllNotFoundTest() {
+    public void testFindAllNotFound() {
         String message = "{\"requestID\":\"38adde30-cc22-11e8-a8d5-f2801f1b9fd1\",\"entity\":\"controller\","
                         + "\"controllers\":[{\"name\":\"test-controller\","
                         + "\"drools\":{\"groupId\":\"org.onap.policy.drools.test\","
@@ -593,7 +593,7 @@ public class MdcTopicFilterTest {
     }
 
     @Test
-    public void findNotFoundTest() {
+    public void testFindNotFound() {
         String message = "{\"requestID\":\"38adde30-cc22-11e8-a8d5-f2801f1b9fd1\",\"entity\":\"controller\","
                 + "\"controllers\":[{\"name\":\"test-controller\","
                 + "\"drools\":{\"groupId\":\"org.onap.policy.drools.test\","
index 21786a1..0b2a3b0 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2018-2020 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.
@@ -34,8 +34,6 @@
     <description>Endpoints</description>
 
     <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
         <jetty.version>9.3.20.v20170531</jetty.version>
     </properties>
 
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
-            <version>2.13.0</version>
             <scope>test</scope>
         </dependency>
         
index c47edbc..ed479d7 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2018, 2020 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.
@@ -34,8 +34,6 @@
     <description>Separately loadable feature module with session persistence code</description>
 
     <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
     </properties>
 
     <build>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 117e641..447835a 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-session-persistence
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 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.
@@ -51,7 +51,8 @@ public class DroolsSessionEntity implements Serializable, DroolsSession {
     @Column(name = "updatedDate", nullable = false)
     private Date updatedDate;
 
-    public DroolsSessionEntity() {}
+    public DroolsSessionEntity() {
+    }
 
     public DroolsSessionEntity(String sessionName, long sessionId) {
         this.sessionName = sessionName;
index def8f2e..d1962b6 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-session-persistence
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 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.
@@ -22,7 +22,7 @@ package org.onap.policy.drools.persistence;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
index e15f57c..97b6874 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-session-persistence
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 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.
@@ -26,9 +26,9 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
index 58f3c16..ae962b3 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017, 2020 AT&T Intellectual Property. All rights reserved.
   Modifications Copyright (C) 2019 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
 
     <name>feature-simulators</name>
 
-    <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>junit</groupId>
@@ -48,7 +43,6 @@
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
-            <version>2.13.0</version>
             <scope>test</scope>
         </dependency>
         <dependency>
index b20d76d..8773aec 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   feature-state-management
   ================================================================================
-  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2020 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.
@@ -94,7 +94,7 @@
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
index 471745d..c4d3881 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-state-management
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 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.
@@ -63,7 +63,8 @@ public class StateManagementProperties {
 
     private static Properties properties = null;
 
-    private StateManagementProperties() {}
+    private StateManagementProperties() {
+    }
 
     /**
      * Initialize the parameter values from the feature-state-management.properties file values.
index e06ba82..04dbdfa 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   feature-test-transaction
   ================================================================================
-  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2020 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.
@@ -31,8 +31,6 @@
     <description>Separately loadable module which sends test transaction through system</description>
 
     <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
     </properties>
 
     <build>
@@ -96,7 +94,7 @@
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 352779d..7a32e54 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-test-transaction
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 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.
@@ -24,9 +24,9 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
index e3c2ed9..f8a8cc2 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * feature-test-transaction
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 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.
@@ -70,7 +70,7 @@ public class TestTransactionTest {
     }
 
     @Test
-    public void registerUnregisterTest() throws InterruptedException {
+    public void testRegisterUnregister() throws InterruptedException {
         final Properties controllerProperties = new Properties();
         controllerProperties.put(DroolsPropertyConstants.PROPERTY_CONTROLLER_NAME, TEST_CONTROLLER_NAME);
         final PolicyController controller =
index 25b099c..632cb1a 100644 (file)
@@ -3,7 +3,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
   Modifications Copyright (C) 2019 Bell Canada.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
 
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
 
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
index 181fbe5..535b1d8 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * policy-core
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 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.
@@ -40,7 +40,8 @@ public interface PolicySessionFeatureApi extends OrderedService {
      * @param args standard 'main' arguments, which are currently ignored
      * @param configDir the relative directory containing configuration files
      */
-    default void globalInit(String[] args, String configDir) {}
+    default void globalInit(String[] args, String configDir) {
+    }
 
     /**
      * This method is used to create a 'KieSession' as part of a
@@ -67,7 +68,8 @@ public interface PolicySessionFeatureApi extends OrderedService {
      *
      * @param policySession the new 'PolicySession' instance
      */
-    default void newPolicySession(PolicySession policySession) {}
+    default void newPolicySession(PolicySession policySession) {
+    }
 
     /**
      * This method is called to select the 'ThreadModel' instance associated
@@ -98,7 +100,8 @@ public interface PolicySessionFeatureApi extends OrderedService {
      * @param policySession the 'PolicySession' object that wrapped the
      *     'KieSession'
      */
-    default void disposeKieSession(PolicySession policySession) {}
+    default void disposeKieSession(PolicySession policySession) {
+    }
 
     /**
      * This method is called after 'KieSession.destroy()' is called.
@@ -106,5 +109,6 @@ public interface PolicySessionFeatureApi extends OrderedService {
      * @param policySession the 'PolicySession' object that wrapped the
      *     'KieSession'
      */
-    default void destroyKieSession(PolicySession policySession) {}
+    default void destroyKieSession(PolicySession policySession) {
+    }
 }
index bd1c6ce..c260924 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -24,18 +24,17 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
-import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
-import java.nio.file.Path;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.List;
 import java.util.stream.Collectors;
+
 import lombok.NonNull;
+
 import org.apache.commons.io.IOUtils;
 import org.drools.compiler.kie.builder.impl.InternalKieModule;
 import org.drools.compiler.kproject.models.KieModuleModelImpl;
@@ -74,7 +73,7 @@ public class KieUtils {
      * Installs a rules artifact in the local maven repository.
      */
     public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, @NonNull List<File> drls)
-    throws IOException {
+        throws IOException {
         KieModuleModel kieModule = KieModuleModelImpl.fromXML(kmodule);
 
         final KieFileSystem kieFileSystem = KieServices.Factory.get().newKieFileSystem();
@@ -92,7 +91,7 @@ public class KieUtils {
      * Installs a rules artifact in the local maven repository.
      */
     public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, File drl)
-    throws IOException {
+        throws IOException {
         return installArtifact(kmodule, pom, drlKJarPath, Collections.singletonList(drl));
     }
 
index c21ce7d..1ed2789 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018, 2020 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.
@@ -135,7 +135,9 @@ public class PolicySessionTest {
             }
 
             @Override
-            public void start() {}
+            public void start() {
+                // do nothing
+            }
         };
 
         model.updated();
index aab04dc..902f304 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
index 89ab9d0..9711074 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -65,7 +65,7 @@ public class KieUtilsTest {
     }
 
     @Test
-    public void installArtifact() throws IOException {
+    public void testInstallArtifact() throws IOException {
         ReleaseId releaseId =
             KieUtils.installArtifact(
                 Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(),
@@ -77,7 +77,7 @@ public class KieUtilsTest {
     }
 
     @Test
-    public void installArtifactList() throws IOException {
+    public void testInstallArtifactList() throws IOException {
         ReleaseId releaseId =
             KieUtils.installArtifact(
                 Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(),
@@ -124,7 +124,7 @@ public class KieUtilsTest {
     }
 
     @Test
-    public void resourceToPackagesTests() {
+    public void testResourceToPackages() {
         // Some minimal logging -- it would be nice to verify the 'KieUtils' logger messages
         StringBuffer log;
 
index 3aa2216..f73fe44 100644 (file)
@@ -3,7 +3,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
   Modifications Copyright (C) 2019 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
 
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
 
index 3451587..da4e154 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 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.
@@ -42,7 +42,8 @@ public class Main {
     protected static final String SYSTEM_SYMM_KEY = "engine.symm.key";
 
     /** constructor (hides public default one). */
-    private Main() {}
+    private Main() {
+    }
 
     /**
      * main.
index 67026c0..7733ca1 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * policy-management
  * ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -32,7 +32,7 @@ import org.junit.Test;
 public class DroolsControllerFactoryTest {
 
     @Test
-    public void buildNullController() {
+    public void testBuildNullController() {
         Properties droolsProps = new Properties();
         DroolsController droolsController = DroolsControllerConstants.getFactory().build(droolsProps, null, null);
 
@@ -42,7 +42,7 @@ public class DroolsControllerFactoryTest {
     }
 
     @Test
-    public void getNullController() {
+    public void testGetNullController() {
         DroolsController controller =
             DroolsControllerConstants.getFactory().get(DroolsControllerConstants.NO_GROUP_ID,
                 DroolsControllerConstants.NO_ARTIFACT_ID, DroolsControllerConstants.NO_VERSION);
@@ -54,7 +54,7 @@ public class DroolsControllerFactoryTest {
     }
 
     @Test
-    public void inventory() {
+    public void testInventory() {
         List<DroolsController> controllers = DroolsControllerConstants.getFactory().inventory();
         assertNotNull(controllers);
 
@@ -66,14 +66,14 @@ public class DroolsControllerFactoryTest {
     }
 
     @Test
-    public void shutdown() {
+    public void testShutdown() {
         DroolsControllerFactory droolsFactory = new IndexedDroolsControllerFactory();
         droolsFactory.shutdown();
         assertTrue(droolsFactory.inventory().isEmpty());
     }
 
     @Test
-    public void destroy() {
+    public void testDestroy() {
         DroolsControllerFactory droolsFactory = new IndexedDroolsControllerFactory();
         droolsFactory.destroy();
         assertTrue(droolsFactory.inventory().isEmpty());
index 7187ad1..2c24848 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
index e99e044..b39276d 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -78,7 +78,7 @@ public class MavenDroolsControllerTest {
     }
 
     @Test
-    public void lock() throws InterruptedException {
+    public void testLock() throws InterruptedException {
         DroolsController controller = createDroolsController(30000L);
 
         controller.lock();
index 8515582..4f9b59d 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -29,7 +29,7 @@ import org.onap.policy.drools.controller.DroolsControllerConstants;
 public class NullDroolsControllerTest {
 
     @Test
-    public void start() {
+    public void testStart() {
         DroolsController controller = new NullDroolsController();
         controller.start();
         Assert.assertFalse(controller.isAlive());
@@ -47,7 +47,7 @@ public class NullDroolsControllerTest {
     }
 
     @Test
-    public void lock() {
+    public void testLock() {
         DroolsController controller = new NullDroolsController();
         controller.lock();
         Assert.assertFalse(controller.isLocked());
index 237bd4d..1afac16 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * policy-management
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 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.
@@ -187,7 +187,7 @@ public class RestManagerTest {
 
 
     @Test
-    public void putDeleteTest() throws IOException {
+    public void testPutDelete() throws IOException {
         HttpDelete httpDelete;
         CloseableHttpResponse response;
 
@@ -394,7 +394,7 @@ public class RestManagerTest {
     }
 
     @Test
-    public void getTest() throws IOException {
+    public void testGet() throws IOException {
         HttpGet httpGet;
         CloseableHttpResponse response;
 
index 8e5cf79..1c5eb61 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -24,7 +24,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
 import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
index 397e953..412e704 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -29,8 +29,8 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyLong;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
index 695893d..cd0d057 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
index a224a63..b438853 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -28,7 +28,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
index 6b6e736..01d7be9 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -23,7 +23,7 @@ package org.onap.policy.drools.system.internal;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
@@ -64,7 +64,7 @@ public class LockManagerTest {
         MockitoAnnotations.initMocks(this);
 
         doAnswer(args -> {
-            args.getArgumentAt(0, Runnable.class).run();
+            args.getArgument(0, Runnable.class).run();
             return null;
         }).when(exsvc).execute(any());
 
index b1c34c2..f60c459 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -29,9 +29,9 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyLong;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
index b3a1e27..1bc680b 100644 (file)
@@ -3,7 +3,7 @@
   ============LICENSE_START=======================================================
   ONAP Policy Engine - Drools PDP
   ================================================================================
-  Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017, 2019-2020 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.
@@ -68,7 +68,7 @@
                                 with minor changes -->
                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                             <includeResources>true</includeResources>
                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
                             <includeTestResources>true</includeTestResources>
index fa8a62c..ee376ba 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * policy-utils
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 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.
@@ -28,7 +28,7 @@ import org.junit.Test;
 public class PairTripleTest {
     
     @Test
-    public void pairTest() {
+    public void testPair() {
         Pair<String, String> pair = new Pair<String, String>("foo", "bar");
         
         assertEquals("foo", pair.first());
@@ -49,7 +49,7 @@ public class PairTripleTest {
     } 
 
     @Test
-    public void tripleTest() {
+    public void testTriple() {
         Triple<String, String, String> triple = new Triple<String, String,String>("foo", "bar", "fiz");
         
         assertEquals("foo", triple.first());
index 706c5f2..efcef27 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * policy-utils
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 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.
@@ -39,7 +39,7 @@ public class ReflectionUtilTest {
     }
 
     @Test
-    public void reflectionTest() {
+    public void testReflection() {
         
         try {
 
index 76fee77..4a7da81 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * policy-utils
  * ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -32,7 +32,7 @@ import org.slf4j.MDC;
 public class MdcTransactionTest {
 
     @Test
-    public void resetSubTransaction() {
+    public void testResetSubTransaction() {
         MdcTransaction trans =
             MdcTransaction.newTransaction(null, null).resetSubTransaction();
 
@@ -115,7 +115,7 @@ public class MdcTransactionTest {
     }
 
     @Test
-    public void flush() {
+    public void testFlush() {
         MdcTransaction trans =
                         MdcTransaction.newTransaction()
                 .setRequestId(null)
@@ -194,7 +194,7 @@ public class MdcTransactionTest {
     }
 
     @Test
-    public void metric() {
+    public void testMetric() {
         MdcTransaction trans =
             MdcTransaction.newTransaction(null, null).metric();
 
@@ -202,7 +202,7 @@ public class MdcTransactionTest {
     }
 
     @Test
-    public void transaction() {
+    public void testTransaction() {
         MdcTransaction trans =
             MdcTransaction.newTransaction(null, null).transaction();
 
@@ -210,7 +210,7 @@ public class MdcTransactionTest {
     }
 
     @Test
-    public void subTransaction() {
+    public void testSubTransaction() {
         MdcTransaction trans =
             MdcTransaction.newTransaction(null, "partner");
 
diff --git a/pom.xml b/pom.xml
index d9160ba..2c1c174 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.policy.parent</groupId>
         <artifactId>integration</artifactId>
-        <version>3.1.0</version>
+        <version>3.1.1-SNAPSHOT</version>
         <relativePath />
     </parent>
 
     <description>The ONAP Policy Engine drools-based PDP Project</description>
 
     <properties>
-        <!-- Project common build settings -->
-        <project.source.version>1.8</project.source.version>
-        <project.target.version>1.8</project.target.version>
-
         <!-- Project path properties -->
         <nexusproxy>https://nexus.onap.org</nexusproxy>
         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
@@ -63,8 +59,8 @@
         <hibernate.commons.annotations.version>5.0.1.Final</hibernate.commons.annotations.version>
         <commons.io.version>2.5</commons.io.version>
         <xml.apis.version>1.4.01</xml.apis.version>
-        <policy.common.version>1.6.1</policy.common.version>
-        <policy.models.version>2.2.0</policy.models.version>
+        <policy.common.version>1.6.2-SNAPSHOT</policy.common.version>
+        <policy.models.version>2.2.1-SNAPSHOT</policy.models.version>
     </properties>
 
     <modules>
                                     with minor changes -->
                                 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
                                 <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                                <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                                <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                                 <includeResources>true</includeResources>
                                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
                                 <includeTestResources>true</includeTestResources>