diff --git a/0001-Port-to-Java-11.patch b/0001-Port-to-Java-11.patch deleted file mode 100644 index efbac70..0000000 --- a/0001-Port-to-Java-11.patch +++ /dev/null @@ -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 diff --git a/0003-Port-to-OpenJDK-21.patch b/0003-Port-to-OpenJDK-21.patch new file mode 100644 index 0000000..5cda095 --- /dev/null +++ b/0003-Port-to-OpenJDK-21.patch @@ -0,0 +1,47 @@ +From 086878cf280edc7c88d6fc990fefea2ffda4556f Mon Sep 17 00:00:00 2001 +From: Marian Koncek +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 + diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 8e5b0f0..390f312 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -2,7 +2,7 @@ Name: apache-commons-collections Version: 3.2.2 -Release: 34%{?dist} +Release: 35%{?dist} Summary: Provides new interfaces, implementations and utilities for Java Collections License: Apache-2.0 URL: http://commons.apache.org/collections/ @@ -13,6 +13,7 @@ Source0: http://www.apache.org/dist/commons/collections/source/commons-co Patch0: 0001-Port-to-Java-8.patch Patch1: 0002-Port-to-OpenJDK-11.patch +Patch2: 0003-Port-to-OpenJDK-21.patch %if %{with bootstrap} BuildRequires: javapackages-bootstrap @@ -58,8 +59,9 @@ Summary: Javadoc for %{name} find . -name "*.jar" -exec rm -f {} \; find . -name "*.class" -exec rm -f {} \; -%patch0 -p1 -%patch1 -p1 +%patch 0 -p1 +%patch 1 -p1 +%patch 2 -p1 # Port to maven-antrun-plugin 3.0.0 sed -i s/tasks/target/ pom.xml @@ -87,6 +89,9 @@ sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt %license LICENSE.txt NOTICE.txt %changelog +* Tue Feb 20 2024 Marian Koncek - 3.2.2-35 +- Port to OpenJDK 21 + * Mon Jan 22 2024 Fedora Release Engineering - 3.2.2-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild