diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2023-07-21 09:41:01 +0100 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2023-08-08 13:56:22 +0100 |
commit | 16ef534c8023dea487106115c53a22a45df76ea2 (patch) | |
tree | d58b6834a59f975a29c8be09ac400bb7caf99a72 /utils-test | |
parent | 379712e996e2ed4df4ba4d2490e3690a0848537b (diff) |
Java 17 Upgrade
Changes to get policy-api java 17 upgrade working
Issue-ID: POLICY-4668
Change-Id: If19d614beb6a21e1d8766ff75f7af21fba245479
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'utils-test')
-rw-r--r-- | utils-test/pom.xml | 50 | ||||
-rw-r--r-- | utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java | 4 |
2 files changed, 11 insertions, 43 deletions
diff --git a/utils-test/pom.xml b/utils-test/pom.xml index 8cdcf1cd..8db9fd5b 100644 --- a/utils-test/pom.xml +++ b/utils-test/pom.xml @@ -34,8 +34,7 @@ <properties> <powermock.version>2.0.4</powermock.version> - - <!-- this whole module is test code --> + <!-- this whole module is testing code --> <sonar.skip>true</sonar.skip> </properties> @@ -43,11 +42,7 @@ <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcpkix-fips</artifactId> - <version>1.0.5</version> - </dependency> - <dependency> - <groupId>com.google.re2j</groupId> - <artifactId>re2j</artifactId> + <version>1.0.7</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> @@ -55,44 +50,12 @@ <version>3.1</version> </dependency> <dependency> - <groupId>org.projectlombok</groupId> - <artifactId>lombok</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - </dependency> - <dependency> <groupId>org.onap.policy.common</groupId> <artifactId>utils</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.onap.policy.common</groupId> - <artifactId>gson</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <scope>test</scope> - </dependency> + + <!-- from parent --> <dependency> <groupId>org.awaitility</groupId> <artifactId>awaitility</artifactId> @@ -103,5 +66,10 @@ <artifactId>openpojo</artifactId> <scope>compile</scope> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>compile</scope> + </dependency> </dependencies> </project> diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java b/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java index 647ff1ba..0787872c 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java @@ -56,6 +56,7 @@ import org.onap.policy.common.utils.resources.ResourceUtils; * Keystore, containing a self-signed certificate, valid for one day (see the argument to * the "-valid" flag below). For use in junit tests. */ +@Getter public class SelfSignedKeyStore { public static final String KEYSTORE_PASSWORD = "Pol1cy_0nap"; public static final String PRIVATE_KEY_PASSWORD = KEYSTORE_PASSWORD; @@ -67,7 +68,6 @@ public class SelfSignedKeyStore { */ private static final String KEYSTORE_SAN = "keystore_san.txt"; - @Getter private final String keystoreName; @@ -115,7 +115,7 @@ public class SelfSignedKeyStore { var sanArray = sanString.replace("DNS:", "").replace("\r", "").split("\n"); GeneralName[] nameArray = Arrays.stream(sanArray).map(name -> new GeneralName(GeneralName.dNSName, name)) - .collect(Collectors.toList()).toArray(new GeneralName[0]); + .toList().toArray(new GeneralName[0]); final var names = new GeneralNames(nameArray); try (var ostr = new FileOutputStream(keystoreFile)) { |