Fridrich Strba 2023-09-21 07:56:25 +00:00 committed by Git OBS Bridge
parent 90a3a4f3d1
commit c6ebb8a4b1
3 changed files with 11 additions and 2 deletions

View File

@ -36,7 +36,8 @@
<property name="maven.deploy.goal" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
<property name="compiler.source" value="1.8" />
<property name="compiler.release" value="8" />
<property name="compiler.source" value="1.${compiler.release}" />
<property name="compiler.target" value="${compiler.source}" />
<target name="init">
@ -76,6 +77,7 @@
debug="on"
classpath="@{classpath}"
includeantruntime="false"
release="${compiler.release}"
source="${compiler.source}"
target="${compiler.target}"
>

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 21 07:53:02 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- 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 <fstrba@suse.com>

View File

@ -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'