policy/pap jdk11 upgrades 86/100286/1
authorHOCKLA <ah999m@att.com>
Tue, 14 Jan 2020 17:06:29 +0000 (11:06 -0600)
committerHOCKLA <ah999m@att.com>
Tue, 14 Jan 2020 17:06:46 +0000 (11:06 -0600)
Issue-ID: POLICY-1593
Change-Id: I61be9364d09b520e30aeac6d825b6c84574790ac
Signed-off-by: HOCKLA <ah999m@att.com>
main/pom.xml
main/src/main/java/org/onap/policy/pap/main/rest/PolicyComponentsHealthCheckControllerV1.java
main/src/test/java/org/onap/policy/pap/main/comm/CommonRequestBase.java
main/src/test/java/org/onap/policy/pap/main/comm/msgdata/UpdateReqTest.java
main/src/test/java/org/onap/policy/pap/main/notification/PolicyNotifierTest.java
main/src/test/java/org/onap/policy/pap/main/rest/ProviderSuper.java
main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyStatusControllerV1.java
pom.xml

index 0b50e84..651b18c 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   ============LICENSE_START=======================================================
    Copyright (C) 2019 Nordix Foundation.
-   Modifications Copyright (C) 2019 AT&T Intellectual Property.
+   Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -86,7 +86,7 @@
         </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
+            <artifactId>powermock-api-mockito2</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 8abc09c..d608b41 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2020 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,7 +40,7 @@ import org.apache.commons.lang3.tuple.Pair;
 
 /**
  * Class to provide REST end point for PAP component to fetch all policy components, including PAP,
- * API, Distribution, and PDPs
+ * API, Distribution, and PDPs.
  *
  * @author Yehui Wang (yehui.wang@est.tech)
  */
index a9cd7d1..47d1de5 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP PAP
  * ================================================================================
- * 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.
@@ -20,7 +20,7 @@
 
 package org.onap.policy.pap.main.comm;
 
-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.verify;
@@ -107,7 +107,7 @@ public class CommonRequestBase {
         doAnswer(new Answer<Object>() {
             @Override
             public Object answer(InvocationOnMock invocation) throws Throwable {
-                queue.add(invocation.getArgumentAt(0, QueueToken.class));
+                queue.add(invocation.getArgument(0, QueueToken.class));
                 return null;
             }
         }).when(publisher).enqueue(any());
index bbaf657..db95515 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP PAP
  * ================================================================================
- * 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.
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertFalse;
 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.never;
 import static org.mockito.Mockito.verify;
 
@@ -194,7 +194,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent() {
+    public void testIsSameContent() {
         PdpUpdate msg2 = new PdpUpdate(update);
         msg2.setName("world");
         assertTrue(data.isSameContent(msg2));
@@ -206,7 +206,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent_BothGroupNamesNull() {
+    public void testIsSameContent_BothGroupNamesNull() {
         PdpUpdate msg2 = new PdpUpdate(update);
         msg2.setPdpGroup(null);
         update.setPdpGroup(null);
@@ -214,7 +214,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent_BothSubGroupNamesNull() {
+    public void testIsSameContent_BothSubGroupNamesNull() {
         PdpUpdate msg2 = new PdpUpdate(update);
         msg2.setPdpSubgroup(null);
         update.setPdpSubgroup(null);
@@ -222,7 +222,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent_DiffGroup() {
+    public void testIsSameContent_DiffGroup() {
         PdpUpdate msg2 = new PdpUpdate(update);
         msg2.setPdpGroup(null);
         assertFalse(data.isSameContent(msg2));
@@ -235,7 +235,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent_DiffSubGroup() {
+    public void testIsSameContent_DiffSubGroup() {
         PdpUpdate msg2 = new PdpUpdate(update);
         msg2.setPdpSubgroup(null);
         assertFalse(data.isSameContent(msg2));
@@ -248,7 +248,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent_DiffPolicies() {
+    public void testIsSameContent_DiffPolicies() {
         PdpUpdate msg2 = new PdpUpdate(update);
 
         ArrayList<ToscaPolicy> policies = new ArrayList<>(update.getPolicies());
@@ -259,7 +259,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent_DiffPolicies_NotNull_Null() {
+    public void testIsSameContent_DiffPolicies_NotNull_Null() {
         PdpUpdate msg2 = new PdpUpdate(update);
         msg2.setPolicies(null);
 
@@ -267,7 +267,7 @@ public class UpdateReqTest extends CommonRequestBase {
     }
 
     @Test
-    public void isSameContent_DiffPolicies_Null_NotNull() {
+    public void testIsSameContent_DiffPolicies_Null_NotNull() {
         PdpUpdate msg2 = new PdpUpdate(update);
 
         update.setPolicies(null);
index 8c84337..478c63c 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP PAP
  * ================================================================================
- * 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,8 +23,8 @@ package org.onap.policy.pap.main.notification;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
@@ -316,7 +316,7 @@ public class PolicyNotifierTest extends PolicyCommonSupport {
     private Answer<Void> addStatus(int listIndex, PolicyStatus... status) {
         return invocation -> {
             @SuppressWarnings("unchecked")
-            List<PolicyStatus> statusList = invocation.getArgumentAt(listIndex, List.class);
+            List<PolicyStatus> statusList = invocation.getArgument(listIndex, List.class);
             statusList.addAll(Arrays.asList(status));
             return null;
         };
index 852516b..a0fa196 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP PAP
  * ================================================================================
- * 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.
@@ -21,7 +21,7 @@
 package org.onap.policy.pap.main.rest;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -101,8 +101,8 @@ public class ProviderSuper {
 
         when(dao.getFilteredPdpGroups(any())).thenReturn(groups);
 
-        when(dao.createPdpGroups(any())).thenAnswer(answer -> answer.getArgumentAt(0, List.class));
-        when(dao.updatePdpGroups(any())).thenAnswer(answer -> answer.getArgumentAt(0, List.class));
+        when(dao.createPdpGroups(any())).thenAnswer(answer -> answer.getArgument(0, List.class));
+        when(dao.updatePdpGroups(any())).thenAnswer(answer -> answer.getArgument(0, List.class));
 
         Registry.register(PapConstants.REG_PDP_MODIFY_LOCK, lockit);
         Registry.register(PapConstants.REG_PDP_MODIFY_MAP, reqmap);
index 1f7c6d0..985ff90 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2019 Nordix Foundation.
- *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
+ *  Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ public class TestPolicyStatusControllerV1 extends CommonPapRestServer {
     }
 
     @Test
-    public void queryAllDeployedPolicies() throws Exception {
+    public void testQueryAllDeployedPolicies() throws Exception {
         String uri = POLICY_STATUS_ENDPOINT;
 
         // verify it fails when no authorization info is included
@@ -63,7 +63,7 @@ public class TestPolicyStatusControllerV1 extends CommonPapRestServer {
     }
 
     @Test
-    public void queryDeployedPolicy() throws Exception {
+    public void testQueryDeployedPolicy() throws Exception {
         String uri = POLICY_STATUS_ENDPOINT + "/my-name/1.2.3";
 
         Invocation.Builder invocationBuilder = sendRequest(uri);
diff --git a/pom.xml b/pom.xml
index c0a55d4..e0ec442 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>
 
@@ -46,8 +46,8 @@
         <sonar.jacoco.itReportPath>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
 
-        <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>