Port to OpenJDK 21

Resolves: RHEL-52709
This commit is contained in:
Marian Koncek 2024-02-20 18:24:42 +01:00 committed by Mikolaj Izdebski
parent 821f7473e1
commit 324957a8c9
3 changed files with 55 additions and 15 deletions

View File

@ -1,13 +0,0 @@
diff --git a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
index dfde362..00c5d26 100644
--- a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
+++ b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
@@ -1116,7 +1116,7 @@ public abstract class AbstractTestCollection extends AbstractTestObject {
verify();
try {
- array = collection.toArray(null);
+ array = collection.toArray((Object[])null);
fail("toArray(null) should raise NPE");
} catch (NullPointerException e) {
// expected

View File

@ -0,0 +1,47 @@
From 086878cf280edc7c88d6fc990fefea2ffda4556f Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Tue, 20 Feb 2024 18:23:57 +0100
Subject: [PATCH] Port to OpenJDK 21
---
.../collections/TestExtendedProperties.java | 26 -------------------
1 file changed, 26 deletions(-)
diff --git a/src/test/org/apache/commons/collections/TestExtendedProperties.java b/src/test/org/apache/commons/collections/TestExtendedProperties.java
index f64812f..13f623a 100644
--- a/src/test/org/apache/commons/collections/TestExtendedProperties.java
+++ b/src/test/org/apache/commons/collections/TestExtendedProperties.java
@@ -315,30 +315,4 @@ public class TestExtendedProperties extends TestCase {
assertEquals("class", extended.getString("resource.loader"));
}
- public void testActiveSecurityManager() {
- SecurityManager manager = new SecurityManager() {
-
- public void checkPropertyAccess(String key) {
- if ("file.separator".equals(key)) {
- throw new SecurityException();
- }
- }
-
- public void checkPermission(Permission perm) {
- }
-
- };
-
- System.setSecurityManager(manager);
-
- try {
- ExtendedProperties properties = new ExtendedProperties();
- assertNotNull(properties);
- } catch (Exception ex) {
- fail("failed to instantiate ExtendedProperties");
- } finally {
- System.setSecurityManager(null);
- }
- }
-
}
--
2.43.0

View File

@ -13,6 +13,7 @@ Source0: http://www.apache.org/dist/commons/collections/source/commons-co
Patch0: 0001-Port-to-Java-8.patch Patch0: 0001-Port-to-Java-8.patch
Patch1: 0002-Port-to-OpenJDK-11.patch Patch1: 0002-Port-to-OpenJDK-11.patch
Patch2: 0003-Port-to-OpenJDK-21.patch
%if %{with bootstrap} %if %{with bootstrap}
BuildRequires: javapackages-bootstrap BuildRequires: javapackages-bootstrap
@ -60,6 +61,7 @@ find . -name "*.class" -exec rm -f {} \;
%patch 0 -p1 %patch 0 -p1
%patch 1 -p1 %patch 1 -p1
%patch 2 -p1
# Port to maven-antrun-plugin 3.0.0 # Port to maven-antrun-plugin 3.0.0
sed -i s/tasks/target/ pom.xml sed -i s/tasks/target/ pom.xml
@ -87,6 +89,10 @@ sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt
%license LICENSE.txt NOTICE.txt %license LICENSE.txt NOTICE.txt
%changelog %changelog
* Mon Aug 05 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.2-36
- Port to OpenJDK 21
- Resolves: RHEL-52709
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 3.2.2-36 * Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 3.2.2-36
- Bump release for Aug 2024 java mass rebuild - Bump release for Aug 2024 java mass rebuild