aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PDP
diff options
context:
space:
mode:
authorHOCKLA <ah999m@att.com>2020-01-17 16:20:01 -0600
committerHOCKLA <ah999m@att.com>2020-01-20 10:34:32 -0600
commite37f5a70bcf3fd8073418c13416cc79c0ef47d59 (patch)
tree4c9c9e0c4c341b2311e4c24311aa9cbffd5dedf1 /ONAP-PDP
parentc8856ab39a6d8376e6ad700b6acabdc7736c714f (diff)
policy/engine jdk11 upgrades
Issue-ID: POLICY-1590 Change-Id: I4da8324a065ac9babe16368e69b76a4cbe9504ef Signed-off-by: HOCKLA <ah999m@att.com>
Diffstat (limited to 'ONAP-PDP')
-rw-r--r--ONAP-PDP/checkstyle-suppressions.xml33
-rw-r--r--ONAP-PDP/pom.xml5
-rw-r--r--ONAP-PDP/src/test/java/org/onap/policy/xacml/pdp/OnapPdpEngineFactoryTest.java9
3 files changed, 42 insertions, 5 deletions
diff --git a/ONAP-PDP/checkstyle-suppressions.xml b/ONAP-PDP/checkstyle-suppressions.xml
new file mode 100644
index 000000000..ee01ae5ae
--- /dev/null
+++ b/ONAP-PDP/checkstyle-suppressions.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2020 AT&T Technologies. 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+
+
+ **** NOTE ****
+ This file is needed to suppress checkstyle for properties files.
+ **************
+-->
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+ <suppress files="\.properties" checks="[a-zA-Z0-9]*"/>
+</suppressions>
diff --git a/ONAP-PDP/pom.xml b/ONAP-PDP/pom.xml
index 044219523..7613258f0 100644
--- a/ONAP-PDP/pom.xml
+++ b/ONAP-PDP/pom.xml
@@ -3,7 +3,7 @@
============LICENSE_START=======================================================
ONAP Policy Engine
================================================================================
- 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.
@@ -99,12 +99,13 @@
<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>
<excludes>
</excludes>
+ <suppressionsLocation>/checkstyle-suppressions.xml</suppressionsLocation>
<consoleOutput>true</consoleOutput>
<failOnViolation>true</failOnViolation>
<violationSeverity>warning</violationSeverity>
diff --git a/ONAP-PDP/src/test/java/org/onap/policy/xacml/pdp/OnapPdpEngineFactoryTest.java b/ONAP-PDP/src/test/java/org/onap/policy/xacml/pdp/OnapPdpEngineFactoryTest.java
index d3ee544a5..9447a951a 100644
--- a/ONAP-PDP/src/test/java/org/onap/policy/xacml/pdp/OnapPdpEngineFactoryTest.java
+++ b/ONAP-PDP/src/test/java/org/onap/policy/xacml/pdp/OnapPdpEngineFactoryTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP-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.
@@ -33,10 +33,13 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "jdk.internal.reflect.*", "javax.xml.*", "org.xml.*"})
+@PrepareForTest(OnapPdpEngineFactory.class)
public class OnapPdpEngineFactoryTest {
@Test
public final void testNewEngine() {
@@ -61,7 +64,7 @@ public class OnapPdpEngineFactoryTest {
@PrepareForTest({ EvaluationContextFactory.class, FactoryFinder.class })
@Test(expected = FactoryException.class)
- public void negTestEngine() throws FactoryException {
+ public void testNegTestEngine() throws FactoryException {
// Setup test data
PowerMockito.mockStatic(FactoryFinder.class);
PowerMockito.when(FactoryFinder.find(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(null);
@@ -74,7 +77,7 @@ public class OnapPdpEngineFactoryTest {
@PrepareForTest({ EvaluationContextFactory.class, FactoryFinder.class })
@Test(expected = FactoryException.class)
- public void negTestEngine2() throws FactoryException {
+ public void testNegTestEngine2() throws FactoryException {
// Setup test data
PowerMockito.mockStatic(FactoryFinder.class);
PowerMockito.when(FactoryFinder.find(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(null);