Port to OpenJDK 21

Resolves: RHEL-52710
This commit is contained in:
Marian Koncek 2024-02-20 16:58:47 +01:00 committed by Mikolaj Izdebski
parent bdf7122f73
commit 7b2d7667d4
2 changed files with 74 additions and 4 deletions

View File

@ -0,0 +1,64 @@
From e5cf5ee78f8504ccdd5af0a05ef7739a99f31059 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Tue, 20 Feb 2024 16:56:44 +0100
Subject: [PATCH] Port to OpenJDK 21
---
.../src/aQute/lib/collections/SortedList.java | 36 +++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/aQute.libg/src/aQute/lib/collections/SortedList.java b/aQute.libg/src/aQute/lib/collections/SortedList.java
index ed33e7f..f584e57 100644
--- a/aQute.libg/src/aQute/lib/collections/SortedList.java
+++ b/aQute.libg/src/aQute/lib/collections/SortedList.java
@@ -3,6 +3,7 @@ package aQute.lib.collections;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
@@ -510,4 +511,39 @@ public class SortedList<T> implements SortedSet<T>, List<T> {
public Spliterator<T> spliterator() {
return SortedSet.super.spliterator();
}
+
+ @Override
+ public SortedList<T> reversed() {
+ return new SortedList(this.list, this.start, this.end, Collections.reverseOrder(this.comparator));
+ }
+
+ @Override
+ public T removeFirst() {
+ return List.super.removeFirst();
+ }
+
+ @Override
+ public T removeLast() {
+ return List.super.removeLast();
+ }
+
+ @Override
+ public T getFirst() {
+ return List.super.getFirst();
+ }
+
+ @Override
+ public T getLast() {
+ return List.super.getLast();
+ }
+
+ @Override
+ public void addFirst(T v) {
+ add(v);
+ }
+
+ @Override
+ public void addLast(T v) {
+ add(v);
+ }
}
--
2.43.0

View File

@ -8,7 +8,7 @@
Name: aqute-bnd
Version: 6.3.1
Release: 9%{?dist}
Release: 10%{?dist}
Summary: BND Tool
# Part of jpm is under BSD, but jpm is not included in binary RPM
License: Apache-2.0 OR EPL-2.0
@ -34,6 +34,7 @@ Source8: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.util/
Patch1: 0001-Disable-removed-commands.patch
Patch2: 0002-Port-to-OSGI-7.0.0.patch
Patch3: 0003-Remove-unmet-dependencies.patch
Patch4: 0004-Port-to-OpenJDK-21.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
@ -101,9 +102,10 @@ API documentation for %{name}.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch 1 -p1
%patch 2 -p1
%patch 3 -p1
%patch 4 -p1
# the commands pull in more dependencies than we want (felix-resolver, jetty)
rm biz.aQute.bnd/src/aQute/bnd/main/{ExportReportCommand,MbrCommand,RemoteCommand,ReporterLogger,ResolveCommand,Shell}.java
@ -244,6 +246,10 @@ echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium
%license LICENSE
%changelog
* Mon Aug 05 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.3.1-10
- Port to OpenJDK 21
- Resolves: RHEL-52710
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 6.3.1-9
- Bump release for Aug 2024 java mass rebuild