Uplift code base to java21 94/142694/1 master
authoradheli.tavares <adheli.tavares@est.tech>
Mon, 8 Dec 2025 14:20:36 +0000 (14:20 +0000)
committerAdheli Tavares <adheli.tavares@est.tech>
Mon, 8 Dec 2025 14:23:42 +0000 (14:23 +0000)
Issue-ID: POLICY-5466
Change-Id: If1150e7da422d512dcf161295d50e425954b0fd3
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
common-parameters/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java
pom.xml

index 0659ad8..56228a1 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2025 OpenInfra Foundation Europe. 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.
@@ -128,7 +128,7 @@ class TestFieldValidator extends ValidatorUtil {
     }
 
     @Test
-    void testFieldValidator() throws NoSuchFieldException, SecurityException {
+    void testFieldValidator() throws SecurityException {
         /*
          * Note: nested classes contain fields like "$this", thus the check for "$" in the
          * variable name is already covered by the other tests.
@@ -143,10 +143,6 @@ class TestFieldValidator extends ValidatorUtil {
             String strValue;
         }
 
-        Field field = NoAnnotations.class.getDeclaredField("this$0");
-
-        assertThat(new FieldValidator(bean, NoAnnotations.class, field).isEmpty()).isTrue();
-
         // unannotated
         assertThat(new FieldValidator(bean, TestFieldValidator.class, getField("unannotated")).isEmpty()).isTrue();
 
diff --git a/pom.xml b/pom.xml
index 1d753f8..03deb86 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <module>policy-endpoints</module>
     </modules>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip />
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-site-plugin</artifactId>
             </plugin>
         </plugins>
     </reporting>
-    <dependencies>
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+
 </project>