Port to OpenJDK 21

Resolves: RHEL-52713
This commit is contained in:
Mikolaj Izdebski 2024-07-04 11:35:01 +02:00
parent a16f68bca9
commit bcd134bc93
2 changed files with 23 additions and 2 deletions

View File

@ -0,0 +1,11 @@
--- qdox-2.1.0/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java~ 2024-07-04 11:31:50.910952394 +0200
+++ qdox-2.1.0/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java 2024-07-04 11:31:53.318965066 +0200
@@ -319,7 +319,7 @@
JavaClass list = builder.getClassByName("java.util.List");
Assertions.assertTrue(list.isInterface());
Assertions.assertNull(list.getSuperJavaClass());
- Assertions.assertEquals("java.util.Collection", list.getImplements().get(0).getValue());
+ Assertions.assertEquals("java.util.SequencedCollection", list.getImplements().get(0).getValue());
}
@Test

View File

@ -2,7 +2,7 @@
Name: qdox
Version: 2.1.0
Release: 3%{?dist}
Release: 5%{?dist}
Summary: Extract class/interface/method definitions from sources
License: Apache-2.0
URL: https://github.com/paul-hammant/qdox
@ -15,12 +15,17 @@ Source1: qdox-MANIFEST.MF
# Remove bundled binaries which are possibly proprietary
Source2: generate-tarball.sh
Patch0: qdox-port-tests-to-java-21.patch
BuildRequires: byaccj
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: maven-local
BuildRequires: jflex
BuildRequires: mvn(org.assertj:assertj-core)
BuildRequires: mvn(org.junit.jupiter:junit-jupiter)
BuildRequires: mvn(org.mockito:mockito-core)
%endif
%description
@ -38,6 +43,7 @@ API docs for %{name}.
%prep
%setup -q
%patch 0 -p1
# remove unnecessary dependency on parent POM
%pom_remove_parent
@ -68,7 +74,7 @@ jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/commentlexe
)
# Build artifact
%mvn_build -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
%mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
# Inject OSGi manifests
jar ufm target/%{name}-%{version}.jar %{SOURCE1}
@ -84,6 +90,10 @@ jar ufm target/%{name}-%{version}.jar %{SOURCE1}
%license LICENSE.txt
%changelog
* Mon Aug 05 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-5
- Port to OpenJDK 21
- Resolves: RHEL-52713
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 2.1.0-3
- Bump release for Aug 2024 java mass rebuild