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'