From 82b162be29015ac529d9e29d0f5ee21d7fc24ecb Mon Sep 17 00:00:00 2001 From: HOCKLA Date: Tue, 14 Jan 2020 11:39:47 -0600 Subject: [PATCH] policy/xacml-pdp jdk11 upgrades Issue-ID: POLICY-1596 Change-Id: I00164ea17eb9d547b45c01e5f46f7aaf0f9a25e2 Signed-off-by: HOCKLA --- applications/common/pom.xml | 14 +++++++-- .../monitoring/checkstyle-suppressions.xml | 3 +- applications/monitoring/pom.xml | 4 +-- applications/naming/pom.xml | 4 +-- applications/optimization/pom.xml | 4 +-- checkstyle-suppressions.xml | 33 ++++++++++++++++++++++ main/pom.xml | 4 +-- .../main/comm/XacmlPdpHearbeatPublisherTest.java | 17 ++++++----- pom.xml | 9 +++--- 9 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 checkstyle-suppressions.xml diff --git a/applications/common/pom.xml b/applications/common/pom.xml index bbceefb9..dbde0ae1 100644 --- a/applications/common/pom.xml +++ b/applications/common/pom.xml @@ -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. @@ -39,9 +39,19 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test + + javax.xml.bind + jaxb-api + ${version.javax.bind} + + + org.glassfish.jaxb + jaxb-runtime + ${version.javax.bind} + com.h2database h2 diff --git a/applications/monitoring/checkstyle-suppressions.xml b/applications/monitoring/checkstyle-suppressions.xml index b7d7df4e..df6cb9a2 100644 --- a/applications/monitoring/checkstyle-suppressions.xml +++ b/applications/monitoring/checkstyle-suppressions.xml @@ -1,7 +1,7 @@ onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/applications/naming/pom.xml b/applications/naming/pom.xml index 0bba663f..7eb945cd 100644 --- a/applications/naming/pom.xml +++ b/applications/naming/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - XACML 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. @@ -35,7 +35,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/applications/optimization/pom.xml b/applications/optimization/pom.xml index 80083643..6d506233 100644 --- a/applications/optimization/pom.xml +++ b/applications/optimization/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - XACML 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. @@ -35,7 +35,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml new file mode 100644 index 00000000..5ea82060 --- /dev/null +++ b/checkstyle-suppressions.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/main/pom.xml b/main/pom.xml index 98c12e8a..4dce052c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - XACML 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. @@ -100,7 +100,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java b/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java index 3478ef3a..f391605a 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java @@ -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. @@ -23,10 +23,9 @@ package org.onap.policy.pdpx.main.comm; import static org.assertj.core.api.Assertions.assertThatCode; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyInt; -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.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; @@ -134,17 +133,17 @@ public class XacmlPdpHearbeatPublisherTest { // null interval - no changes publisher.restart(null); - verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any()); + verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any()); assertSame(timer2, timers.peek()); // same interval - no changes publisher.restart(INTERVAL1); - verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any()); + verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any()); assertSame(timer2, timers.peek()); // invalid interval - no changes publisher.restart(INTERVAL_INVALID); - verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any()); + verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any()); assertSame(timer2, timers.peek()); // new interval - old timer should be cancelled and new started @@ -162,7 +161,7 @@ public class XacmlPdpHearbeatPublisherTest { // repeat - nothing more should happen publisher.start(); - verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any()); + verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any()); verify(timer1, never()).cancel(anyBoolean()); } diff --git a/pom.xml b/pom.xml index 1f05fa78..631f7cdf 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ org.onap.policy.parent integration - 3.1.0 + 3.1.1-SNAPSHOT @@ -44,8 +44,8 @@ ${project.basedir}/../target/code-coverage/jacoco-ut.exec ${project.basedir}/../target/code-coverage/jacoco-it.exec reuseReports - 1.6.1 - 2.2.0 + 1.6.2-SNAPSHOT + 2.2.1-SNAPSHOT @@ -168,12 +168,13 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true + /checkstyle-suppressions.xml true true warning -- 2.16.6