summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHOCKLA <ah999m@att.com>2020-01-20 16:37:27 -0600
committerHOCKLA <ah999m@att.com>2020-01-22 08:46:55 -0600
commitb830606fbb6d76757f4b3c66e612a7f0f4dee331 (patch)
tree7a790c99912e857d0f1f618122dca5e65eade0dd
parent8c9a29a362e29db4ba81107b1c75c0aba467b7ae (diff)
policy/distribution jdk11 upgrades
Issue-ID: POLICY-1585 Change-Id: I4aa879656c039d9de9c288f0309105c21f4bf285 Signed-off-by: HOCKLA <ah999m@att.com>
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java7
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java7
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java4
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java4
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandler.java7
-rw-r--r--packages/policy-distribution-docker/src/main/docker/Dockerfile6
-rw-r--r--plugins/forwarding-plugins/pom.xml4
-rw-r--r--plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java10
-rw-r--r--plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpPolicyForwarderTest.java60
-rw-r--r--plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyDecoder.java4
-rw-r--r--plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java7
-rw-r--r--plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApi.java7
-rw-r--r--plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyDecoder.java4
-rw-r--r--plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicyForwarder.java4
-rw-r--r--pom.xml8
-rw-r--r--reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyDecoder.java4
-rw-r--r--reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyPolicyForwarder.java4
-rw-r--r--reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyReceptionHandler.java7
18 files changed, 88 insertions, 70 deletions
diff --git a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java b/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java
index 7a9835cb..037ec3a2 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Intel. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -97,10 +98,12 @@ public class TestHttpsDistributionRestServer {
}
@Override
- public void checkClientTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {}
+ public void checkClientTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {
+ }
@Override
- public void checkServerTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {}
+ public void checkServerTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {
+ }
} };
final SSLContext sc = SSLContext.getInstance("TLSv1.2");
diff --git a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java b/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java
index ba64e550..e659f04f 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Intel. All rights reserved.
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -95,10 +96,12 @@ public class TestHttpsStatisticDistributionRestServer {
}
@Override
- public void checkClientTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {}
+ public void checkClientTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {
+ }
@Override
- public void checkServerTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {}
+ public void checkServerTrusted(final java.security.cert.X509Certificate[] certs, final String authType) {
+ }
} };
final SSLContext sc = SSLContext.getInstance("TLSv1.2");
diff --git a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java
index b9ee0768..1665a425 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyDecoder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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.
@@ -58,5 +59,6 @@ public class DummyDecoder implements PolicyDecoder<PolicyInput, ToscaEntity> {
}
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {
+ }
}
diff --git a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java
index f2779c85..220660de 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyPolicyForwarder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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,5 +52,6 @@ public class DummyPolicyForwarder implements PolicyForwarder {
}
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {
+ }
}
diff --git a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandler.java b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandler.java
index 8d3ec682..16b2d563 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandler.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandler.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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.
@@ -30,8 +31,10 @@ import org.onap.policy.distribution.reception.handling.AbstractReceptionHandler;
public class DummyReceptionHandler extends AbstractReceptionHandler {
@Override
- public void initializeReception(final String parameterGroupName) {}
+ public void initializeReception(final String parameterGroupName) {
+ }
@Override
- public void destroy() {}
+ public void destroy() {
+ }
}
diff --git a/packages/policy-distribution-docker/src/main/docker/Dockerfile b/packages/policy-distribution-docker/src/main/docker/Dockerfile
index 54d268ce..f5571c44 100644
--- a/packages/policy-distribution-docker/src/main/docker/Dockerfile
+++ b/packages/policy-distribution-docker/src/main/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM onap/policy-common-alpine:1.4.0
+FROM onap/policy-jre-alpine
LABEL maintainer="Policy Team"
@@ -8,9 +8,9 @@ ENV POLICY_LOGS=$POLICY_LOGS
ENV POLICY_HOME=$POLICY_HOME/distribution
RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin && \
- chown -R policy:policy $POLICY_HOME $POLICY_LOGS
+ chown -R policy:policy $POLICY_HOME $POLICY_LOGS &&\
+ mkdir /packages
-RUN mkdir /packages
COPY /maven/* /packages
RUN tar xvfz /packages/policy-distribution.tar.gz --directory $POLICY_HOME \
&& rm /packages/policy-distribution.tar.gz
diff --git a/plugins/forwarding-plugins/pom.xml b/plugins/forwarding-plugins/pom.xml
index d2c51e0c..1d6c7f7a 100644
--- a/plugins/forwarding-plugins/pom.xml
+++ b/plugins/forwarding-plugins/pom.xml
@@ -57,8 +57,8 @@
<version>${policy.apex-pdp.version}</version>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java
index 5eae7df3..247334db 100644
--- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java
+++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/file/FilePolicyForwarderTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,11 +39,12 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.common.parameters.ParameterService;
import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
+
/**
* Class to perform unit test of {@link FilePolicyForwarder}.
*
@@ -94,13 +95,14 @@ public class FilePolicyForwarderTest {
}
@Test
- @SuppressWarnings("unchecked")
public void testForwardPolicyError() {
final Collection<ToscaEntity> policies = new ArrayList<>();
final ToscaPolicy policy = createPolicy(policies, "test", "test");
final ToscaPolicy spy = Mockito.spy(policy);
- Mockito.when(spy.toString()).thenThrow(IOException.class);
+ Mockito.when(spy.toString()).thenAnswer(invocation -> {
+ throw new IOException();
+ });
policies.add(spy);
final FilePolicyForwarder forwarder = new FilePolicyForwarder();
diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpPolicyForwarderTest.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpPolicyForwarderTest.java
index 03adc0e1..222614d9 100644
--- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpPolicyForwarderTest.java
+++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/engine/XacmlPdpPolicyForwarderTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,9 +23,9 @@
package org.onap.policy.distribution.forwarding.xacml.pdp.engine;
import static org.junit.Assert.assertSame;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.argThat;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -38,10 +38,9 @@ import java.util.HashMap;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Response;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.mockito.ArgumentMatcher;
import org.onap.policy.api.PolicyParameters;
import org.onap.policy.api.PushPolicyParameters;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
@@ -83,8 +82,8 @@ public class XacmlPdpPolicyForwarderTest {
final HttpClient httpClientMock = mock(HttpClient.class);
headers.put(CLIENT_AUTH, CLIENT_AUTH_VALUE);
- when(httpClientMock.put(eq("createPolicy"), anyObject(), eq(headers))).thenReturn(Response.ok().build());
- when(httpClientMock.put(eq("pushPolicy"), anyObject(), eq(headers))).thenReturn(Response.ok().build());
+ when(httpClientMock.put(eq("createPolicy"), any(), eq(headers))).thenReturn(Response.ok().build());
+ when(httpClientMock.put(eq("pushPolicy"), any(), eq(headers))).thenReturn(Response.ok().build());
final HttpClientFactory httpClientFactoryMock = mock(HttpClientFactory.class);
when(httpClientFactoryMock.build(argThat(matcher))).thenReturn(httpClientMock);
@@ -118,8 +117,8 @@ public class XacmlPdpPolicyForwarderTest {
final HttpClient httpClientMock = mock(HttpClient.class);
headers.put(CLIENT_AUTH, CLIENT_AUTH_VALUE);
- when(httpClientMock.put(eq("createPolicy"), anyObject(), eq(headers))).thenReturn(Response.status(400).build());
- when(httpClientMock.put(eq("pushPolicy"), anyObject(), eq(headers))).thenReturn(Response.ok().build());
+ when(httpClientMock.put(eq("createPolicy"), any(), eq(headers))).thenReturn(Response.status(400).build());
+ when(httpClientMock.put(eq("pushPolicy"), any(), eq(headers))).thenReturn(Response.ok().build());
final HttpClientFactory httpClientFactoryMock = mock(HttpClientFactory.class);
when(httpClientFactoryMock.build(argThat(matcher))).thenReturn(httpClientMock);
@@ -132,7 +131,7 @@ public class XacmlPdpPolicyForwarderTest {
forwarder.forward(policies);
verify(httpClientMock).put(eq("createPolicy"), argThat(new PolicyParametersEntityMatcher(policy)), eq(headers));
- verify(httpClientMock, times(0)).put(eq("pushPolicy"), anyObject(), anyObject());
+ verify(httpClientMock, times(0)).put(eq("pushPolicy"), any(), any());
}
@Test
@@ -140,8 +139,8 @@ public class XacmlPdpPolicyForwarderTest {
final HttpClient httpClientMock = mock(HttpClient.class);
headers.put(CLIENT_AUTH, CLIENT_AUTH_VALUE);
- when(httpClientMock.put(eq("createPolicy"), anyObject(), eq(headers))).thenReturn(Response.ok().build());
- when(httpClientMock.put(eq("pushPolicy"), anyObject(), eq(headers))).thenReturn(Response.status(400).build());
+ when(httpClientMock.put(eq("createPolicy"), any(), eq(headers))).thenReturn(Response.ok().build());
+ when(httpClientMock.put(eq("pushPolicy"), any(), eq(headers))).thenReturn(Response.status(400).build());
final HttpClientFactory httpClientFactoryMock = mock(HttpClientFactory.class);
when(httpClientFactoryMock.build(argThat(matcher))).thenReturn(httpClientMock);
@@ -163,8 +162,8 @@ public class XacmlPdpPolicyForwarderTest {
final HttpClient httpClientMock = mock(HttpClient.class);
headers.put(CLIENT_AUTH, CLIENT_AUTH_VALUE);
- when(httpClientMock.put(eq("createPolicy"), anyObject(), eq(headers))).thenReturn(Response.ok().build());
- when(httpClientMock.put(eq("pushPolicy"), anyObject(), eq(headers))).thenReturn(Response.status(400).build());
+ when(httpClientMock.put(eq("createPolicy"), any(), eq(headers))).thenReturn(Response.ok().build());
+ when(httpClientMock.put(eq("pushPolicy"), any(), eq(headers))).thenReturn(Response.status(400).build());
final HttpClientFactory httpClientFactoryMock = mock(HttpClientFactory.class);
when(httpClientFactoryMock.build(argThat(matcher))).thenThrow(new HttpClientConfigException());
@@ -178,8 +177,8 @@ public class XacmlPdpPolicyForwarderTest {
assertSame(policy, policies.iterator().next());
- verify(httpClientMock, times(0)).put(eq("createPolicy"), anyObject(), anyObject());
- verify(httpClientMock, times(0)).put(eq("pushPolicy"), anyObject(), anyObject());
+ verify(httpClientMock, times(0)).put(eq("createPolicy"), any(), any());
+ verify(httpClientMock, times(0)).put(eq("pushPolicy"), any(), any());
}
@Test
@@ -187,8 +186,8 @@ public class XacmlPdpPolicyForwarderTest {
final HttpClient httpClientMock = mock(HttpClient.class);
headers.put(CLIENT_AUTH, CLIENT_AUTH_VALUE);
- when(httpClientMock.put(eq("createPolicy"), anyObject(), eq(headers))).thenReturn(Response.ok().build());
- when(httpClientMock.put(eq("pushPolicy"), anyObject(), eq(headers))).thenReturn(Response.status(400).build());
+ when(httpClientMock.put(eq("createPolicy"), any(), eq(headers))).thenReturn(Response.ok().build());
+ when(httpClientMock.put(eq("pushPolicy"), any(), eq(headers))).thenReturn(Response.status(400).build());
final HttpClientFactory httpClientFactoryMock = mock(HttpClientFactory.class);
when(httpClientFactoryMock.build(argThat(matcher))).thenReturn(httpClientMock)
@@ -202,10 +201,10 @@ public class XacmlPdpPolicyForwarderTest {
forwarder.forward(policies);
verify(httpClientMock).put(eq("createPolicy"), argThat(new PolicyParametersEntityMatcher(policy)), eq(headers));
- verify(httpClientMock, times(0)).put(eq("pushPolicy"), anyObject(), anyObject());
+ verify(httpClientMock, times(0)).put(eq("pushPolicy"), any(), any());
}
- class BusTopicParamsMatcher extends BaseMatcher<BusTopicParams> {
+ class BusTopicParamsMatcher implements ArgumentMatcher<BusTopicParams> {
private BusTopicParams busTopicParams;
@@ -214,7 +213,7 @@ public class XacmlPdpPolicyForwarderTest {
}
@Override
- public boolean matches(final Object arg0) {
+ public boolean matches(final BusTopicParams arg0) {
if (arg0 instanceof BusTopicParams) {
final BusTopicParams toCompareTo = (BusTopicParams) arg0;
return toCompareTo.isUseHttps() == busTopicParams.isUseHttps()
@@ -226,12 +225,9 @@ public class XacmlPdpPolicyForwarderTest {
}
return false;
}
-
- @Override
- public void describeTo(final Description arg0) {}
}
- class PolicyParametersEntityMatcher extends BaseMatcher<Entity<PolicyParameters>> {
+ class PolicyParametersEntityMatcher implements ArgumentMatcher<Entity<PolicyParameters>> {
private ToscaPolicy policy;
@@ -241,19 +237,16 @@ public class XacmlPdpPolicyForwarderTest {
@SuppressWarnings("unchecked")
@Override
- public boolean matches(final Object arg0) {
+ public boolean matches(final Entity<PolicyParameters> arg0) {
if (arg0 instanceof Entity) {
final PolicyParameters toCompareTo = ((Entity<PolicyParameters>) arg0).getEntity();
return toCompareTo.getPolicyName().equals(policy.getName());
}
return false;
}
-
- @Override
- public void describeTo(final Description arg0) {}
}
- class PushPolicyParametersEntityMatcher extends BaseMatcher<Entity<PushPolicyParameters>> {
+ class PushPolicyParametersEntityMatcher implements ArgumentMatcher<Entity<PushPolicyParameters>> {
private ToscaPolicy policy;
@@ -263,7 +256,7 @@ public class XacmlPdpPolicyForwarderTest {
@SuppressWarnings("unchecked")
@Override
- public boolean matches(final Object arg0) {
+ public boolean matches(final Entity<PushPolicyParameters> arg0) {
if (arg0 instanceof Entity) {
final PushPolicyParameters toCompareTo = ((Entity<PushPolicyParameters>) arg0).getEntity();
return toCompareTo.getPolicyName().equals(policy.getName())
@@ -272,9 +265,6 @@ public class XacmlPdpPolicyForwarderTest {
}
return false;
}
-
- @Override
- public void describeTo(final Description arg0) {}
}
class UnsupportedPolicy extends ToscaEntity {
diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyDecoder.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyDecoder.java
index 4cd7e24c..f2fb144a 100644
--- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyDecoder.java
+++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyDecoder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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.
@@ -58,5 +59,6 @@ public class DummyDecoder implements PolicyDecoder<PolicyInput, ToscaEntity> {
}
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {
+ }
}
diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java
index c0934812..f9bde3c3 100644
--- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java
+++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/xacml/pdp/testclasses/DummyReceptionHandler.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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.
@@ -30,8 +31,10 @@ import org.onap.policy.distribution.reception.handling.AbstractReceptionHandler;
public class DummyReceptionHandler extends AbstractReceptionHandler {
@Override
- public void initializeReception(final String parameterGroupName) {}
+ public void initializeReception(final String parameterGroupName) {
+ }
@Override
- public void destroy() {}
+ public void destroy() {
+ }
}
diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApi.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApi.java
index 762549fa..3b8339a9 100644
--- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApi.java
+++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApi.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 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 +27,6 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.lang.String;
import java.util.Collection;
-import java.util.List;
import java.util.Map;
import org.junit.AfterClass;
@@ -38,16 +38,13 @@ import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.distribution.model.Csar;
import org.onap.policy.distribution.reception.decoding.PolicyDecodingException;
-import org.onap.policy.distribution.reception.decoding.pdpx.FlavorFeature;
import org.onap.policy.distribution.reception.decoding.pdpx.PolicyDecoderCsarPdpxLifecycleApi;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaProperty;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import org.onap.policy.models.tosca.authorative.concepts.ToscaTopologyTemplate;
+
/**
* Class to perform unit test of {@link PolicyDecoderCsarPdpxLifecycleApiLifecycleApi}.
- *
*/
public class TestPolicyDecoderCsarPdpxLifecycleApi {
diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyDecoder.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyDecoder.java
index de1bb852..844dec48 100644
--- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyDecoder.java
+++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyDecoder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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,5 +66,6 @@ public class DummyDecoder implements PolicyDecoder<Csar, DummyPolicy> {
}
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {
+ }
}
diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicyForwarder.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicyForwarder.java
index a18df167..5455eae3 100644
--- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicyForwarder.java
+++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/DummyPolicyForwarder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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,5 +74,6 @@ public class DummyPolicyForwarder implements PolicyForwarder {
* {@inheritDoc}.
*/
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {
+ }
}
diff --git a/pom.xml b/pom.xml
index c01fb43f..58faf41f 100644
--- 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>
@@ -43,10 +43,10 @@
<!-- Default Sonar configuration -->
<sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
- <policy.common.version>1.6.1</policy.common.version>
+ <policy.common.version>1.6.2-SNAPSHOT</policy.common.version>
<policy.engine.version>1.6.0-SNAPSHOT</policy.engine.version>
<policy.apex-pdp.version>2.3.0-SNAPSHOT</policy.apex-pdp.version>
- <policy.models.version>2.2.0</policy.models.version>
+ <policy.models.version>2.2.1-SNAPSHOT</policy.models.version>
</properties>
<modules>
@@ -102,7 +102,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>
diff --git a/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyDecoder.java b/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyDecoder.java
index aa61c1c2..6116581f 100644
--- a/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyDecoder.java
+++ b/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyDecoder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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.
@@ -58,5 +59,6 @@ public class DummyDecoder implements PolicyDecoder<PolicyInput, ToscaEntity> {
}
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {
+ }
}
diff --git a/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyPolicyForwarder.java b/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyPolicyForwarder.java
index 588adc8f..7d993037 100644
--- a/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyPolicyForwarder.java
+++ b/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyPolicyForwarder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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,5 +52,6 @@ public class DummyPolicyForwarder implements PolicyForwarder {
}
@Override
- public void configure(final String parameterGroupName) {}
+ public void configure(final String parameterGroupName) {
+ }
}
diff --git a/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyReceptionHandler.java b/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyReceptionHandler.java
index 43596ff2..bcb56a61 100644
--- a/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyReceptionHandler.java
+++ b/reception/src/test/java/org/onap/policy/distribution/reception/handling/DummyReceptionHandler.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 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,8 +29,10 @@ package org.onap.policy.distribution.reception.handling;
class DummyReceptionHandler extends AbstractReceptionHandler {
@Override
- protected void initializeReception(final String parameterGroupName) {}
+ protected void initializeReception(final String parameterGroupName) {
+ }
@Override
- public void destroy() {}
+ public void destroy() {
+ }
}