From 77f536fe3cccee3d538b19285c08682140be2223 Mon Sep 17 00:00:00 2001 From: Antonio Santos Izaguirre Date: Fri, 16 Feb 2024 01:50:29 +0100 Subject: [PATCH] fix #267, migrating JUnit 4 to JUnit 5 Signed-off-by: Antonio Santos Izaguirre --- .../jakarta/xml/bind/JAXBIntrospector.java | 4 +- jaxb-api-test/pom.xml | 9 +- .../test/JAXBContextOldParameterized.java | 32 +++ .../JAXBContextServiceProviderNPETest.java | 31 +-- .../xml/bind/test/JAXBContextTest.java | 208 +++++++++--------- .../test/JAXBContextWrapExceptionTest.java | 27 +-- .../test/java/jaxb/factory/legacy/Valid.java | 4 +- .../test/java/jaxb/factory/legacy/Valid2.java | 4 +- .../test/java/jaxb/factory/legacy/Valid3.java | 4 +- jaxb-api-test/src/test/java/module-info.java | 5 +- .../jakarta/xml/bind/test/allScenarios.csv | 24 ++ 11 files changed, 202 insertions(+), 150 deletions(-) create mode 100644 jaxb-api-test/src/test/java/jakarta/xml/bind/test/JAXBContextOldParameterized.java create mode 100644 jaxb-api-test/src/test/resources/jakarta/xml/bind/test/allScenarios.csv diff --git a/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java b/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java index 71ff142..e07c3fb 100644 --- a/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java +++ b/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -73,7 +73,7 @@ protected JAXBIntrospector() {} */ public static Object getValue(Object jaxbElement) { if (jaxbElement instanceof JAXBElement) { - return ((JAXBElement)jaxbElement).getValue(); + return ((JAXBElement)jaxbElement).getValue(); } else { // assume that class of this instance is // annotated with @XmlRootElement. diff --git a/jaxb-api-test/pom.xml b/jaxb-api-test/pom.xml index ab3cc65..1927357 100644 --- a/jaxb-api-test/pom.xml +++ b/jaxb-api-test/pom.xml @@ -1,7 +1,7 @@