From bb36908cd81f20df8c7328f1e2e36181a2b3b33f Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Mon, 8 Dec 2025 14:20:36 +0000 Subject: [PATCH] Uplift code base to java21 Issue-ID: POLICY-5466 Change-Id: If1150e7da422d512dcf161295d50e425954b0fd3 Signed-off-by: adheli.tavares --- .../common/parameters/TestFieldValidator.java | 8 ++------ pom.xml | 23 +++++++++------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java index 0659ad81..56228a1b 100644 --- a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestFieldValidator.java +++ b/common-parameters/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,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 1d753f83..03deb86b 100644 --- a/pom.xml +++ b/pom.xml @@ -60,15 +60,16 @@ policy-endpoints + + + org.junit.jupiter + junit-jupiter-api + test + + + - - org.apache.maven.plugins - maven-deploy-plugin - - - - org.apache.maven.plugins maven-site-plugin @@ -100,11 +101,5 @@ - - - org.junit.jupiter - junit-jupiter-api - test - - + -- 2.16.6