From 92470577e4b0dedba0bd9f5ef0b4faf52d808cce Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Mon, 8 Dec 2025 15:46:48 +0000 Subject: [PATCH] Uplift code base to java21 Issue-ID: POLICY-5466 Change-Id: I843aa55ad3f5a0148ccce0f0e998100189102d5d Signed-off-by: adheli.tavares --- .../onap/policy/common/parameters/TestFieldValidator.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/policy-common/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java b/policy-common/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java index 0659ad81b..2f8e44e8a 100644 --- a/policy-common/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java +++ b/policy-common/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java @@ -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(); -- 2.16.6