From c6ebb8a4b1ee7e36de58098547fb1ff3e65572de32a59e10ed7752712cdd6a26 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 21 Sep 2023 07:56:25 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/junit?expand=0&rev=52 --- build.xml | 4 +++- junit.changes | 7 +++++++ junit.spec | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 6f35bf1..46971d5 100644 --- a/build.xml +++ b/build.xml @@ -36,7 +36,8 @@ - + + @@ -76,6 +77,7 @@ debug="on" classpath="@{classpath}" includeantruntime="false" + release="${compiler.release}" source="${compiler.source}" target="${compiler.target}" > diff --git a/junit.changes b/junit.changes index 2b89d67..81e3596 100644 --- a/junit.changes +++ b/junit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 21 07:53:02 UTC 2023 - Fridrich Strba + +- Let ant build with --release 8 if the compiler knows that option. + This allows us to avoid incompatible exception declarations + in ObjectInputStream.GetField.get(String,Object) in java >= 20 + ------------------------------------------------------------------- Thu Mar 23 17:18:10 UTC 2023 - Fridrich Strba diff --git a/junit.spec b/junit.spec index 1dc2af3..10ec989 100644 --- a/junit.spec +++ b/junit.spec @@ -110,7 +110,7 @@ class test { } EOF -javac -cp %{buildroot}/%{_javadir}/%{name}.jar test.java +javac -source 8 -target 8 -cp %{buildroot}/%{_javadir}/%{name}.jar test.java java -cp %{buildroot}/%{_javadir}/%{name}.jar: test 2>&1 | \ grep 'Exception in thread "main" java.lang.AssertionError: Hello world from junit'