Accepting request 1120555 from Java:packages

Fix build with jdk 21

OBS-URL: https://build.opensuse.org/request/show/1120555
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/junit5?expand=0&rev=6
This commit is contained in:
Ana Guerrero 2023-10-26 15:15:10 +00:00 committed by Git OBS Bridge
commit 4a0514903c
3 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Oct 26 12:21:48 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* unreported-exception.patch fix unreported exception error that
is fatal with JDK 21
-------------------------------------------------------------------
Mon Sep 11 10:40:34 UTC 2023 - Fridrich Strba <fstrba@suse.com>

View File

@ -50,6 +50,7 @@ Source304: https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-p
Source400: https://repo1.maven.org/maven2/org/junit/vintage/junit-vintage-engine/%{vintage_version}/junit-vintage-engine-%{vintage_version}.pom
# BOM POM
Source500: https://repo1.maven.org/maven2/org/junit/junit-bom/%{version}/junit-bom-%{version}.pom
Patch0: unreported-exception.patch
BuildRequires: asciidoc
BuildRequires: fdupes
BuildRequires: maven-local
@ -92,6 +93,7 @@ JUnit 5 User Guide.
%prep
%setup -q -n %{name}-r%{version}
%patch0 -p1
find -name \*.jar -delete
cp -p %{SOURCE100} pom.xml

View File

@ -0,0 +1,11 @@
--- junit5-r5.8.2/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java 2023-10-26 14:17:20.653152124 +0200
+++ junit5-r5.8.2/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java 2023-10-26 14:18:08.740160341 +0200
@@ -316,7 +316,7 @@
}
@SuppressWarnings("unchecked")
- private SerializedForm(ObjectInputStream.GetField fields) throws IOException {
+ private SerializedForm(ObjectInputStream.GetField fields) throws ClassNotFoundException, IOException {
this.uniqueId = (String) fields.get("uniqueId", null);
this.parentId = (String) fields.get("parentId", null);
this.displayName = (String) fields.get("displayName", null);