Uplift code base to java21 98/142698/1
authoradheli.tavares <adheli.tavares@est.tech>
Mon, 8 Dec 2025 15:46:48 +0000 (15:46 +0000)
committeradheli.tavares <adheli.tavares@est.tech>
Mon, 8 Dec 2025 15:47:46 +0000 (15:47 +0000)
Issue-ID: POLICY-5466
Change-Id: I843aa55ad3f5a0148ccce0f0e998100189102d5d
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
policy-common/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java

index 0659ad8..2f8e44e 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,12 +128,7 @@ class TestFieldValidator extends ValidatorUtil {
     }
 
     @Test
-    void testFieldValidator() throws NoSuchFieldException, SecurityException {
-        /*
-         * Note: nested classes contain fields like "$this", thus the check for "$" in the
-         * variable name is already covered by the other tests.
-         */
-
+    void testFieldValidator() throws SecurityException {
         /*
          * Class with no annotations.
          */
@@ -143,10 +138,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();