Compare commits

...

No commits in common. "c8-stream-10.6" and "c8-stream-201902" have entirely different histories.

3 changed files with 80 additions and 33 deletions

View File

@ -1,16 +1,17 @@
From 066f654cd6a1b9d3bfd54565af1d618dada2deb4 Mon Sep 17 00:00:00 2001
From 93a0da9fde8676714db9d79ac003749940a76044 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 17 Nov 2015 01:02:55 +0100
Subject: [PATCH] Port to Java 8
---
src/java/org/apache/commons/collections/MultiHashMap.java | 8 ++++----
.../org/apache/commons/collections/MultiHashMap.java | 8 ++++----
src/java/org/apache/commons/collections/MultiMap.java | 4 ++--
src/java/org/apache/commons/collections/map/MultiKeyMap.java | 8 +++++---
src/java/org/apache/commons/collections/map/MultiValueMap.java | 8 ++++----
src/test/org/apache/commons/collections/TestMultiHashMap.java | 10 +++++-----
.../org/apache/commons/collections/map/TestMultiKeyMap.java | 4 ++--
6 files changed, 22 insertions(+), 20 deletions(-)
.../apache/commons/collections/map/MultiKeyMap.java | 8 +++++---
.../apache/commons/collections/map/MultiValueMap.java | 8 ++++----
.../apache/commons/collections/TestMultiHashMap.java | 10 +++++-----
.../commons/collections/map/TestMultiKeyMap.java | 4 ++--
.../commons/collections/map/TestMultiValueMap.java | 10 +++++-----
7 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java
index 7fec9af..bcb4a11 100644
@ -160,6 +161,27 @@ index b1ee3d0..66fcade 100644
assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1)));
break;
case 3:
--
2.5.0
diff --git a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java
index b9a5ac8..b37dc0c 100644
--- a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java
+++ b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java
@@ -338,11 +338,11 @@ public class TestMultiValueMap extends TestCase {
map.put("A", "AA");
map.put("A", "AB");
map.put("A", "AC");
- assertEquals(null, map.remove("C", "CA"));
- assertEquals(null, map.remove("A", "AD"));
- assertEquals("AC", map.remove("A", "AC"));
- assertEquals("AB", map.remove("A", "AB"));
- assertEquals("AA", map.remove("A", "AA"));
+ assertEquals(false, map.remove("C", "CA"));
+ assertEquals(false, map.remove("A", "AD"));
+ assertEquals(true, map.remove("A", "AC"));
+ assertEquals(true, map.remove("A", "AB"));
+ assertEquals(true, map.remove("A", "AA"));
assertEquals(new MultiValueMap(), map);
}
--
2.21.0

View File

@ -0,0 +1,25 @@
From 085b289c17f7047f4350d52bf594313392ae0caa Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 31 Oct 2019 12:30:12 +0100
Subject: [PATCH] Port to OpenJDK 11
---
.../commons/collections/collection/AbstractTestCollection.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
index dfde362..8287f33 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
--
2.21.0

View File

@ -1,20 +1,18 @@
%global base_name collections
%global short_name commons-%{base_name}
Name: apache-%{short_name}
Name: apache-commons-collections
Version: 3.2.2
Release: 10%{?dist}
Release: 13%{?dist}
Summary: Provides new interfaces, implementations and utilities for Java Collections
License: ASL 2.0
URL: http://commons.apache.org/%{base_name}/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Patch0: 0001-Port-to-Java-8.patch
URL: http://commons.apache.org/collections/
BuildArch: noarch
BuildRequires: ant
Source0: http://www.apache.org/dist/commons/collections/source/commons-collections-%{version}-src.tar.gz
Patch0: 0001-Port-to-Java-8.patch
Patch1: 0002-Port-to-OpenJDK-11.patch
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
@ -42,37 +40,31 @@ Requires: %{name} = %{version}-%{release}
%package javadoc
Summary: Javadoc for %{name}
Provides: %{name}-testframework-javadoc = %{version}-%{release}
Obsoletes: %{name}-testframework-javadoc < %{version}-%{release}
%description javadoc
%{summary}.
%prep
%setup -q -n %{short_name}-%{version}-src
%setup -q -n commons-collections-%{version}-src
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
find . -name "*.class" -exec rm -f {} \;
%patch0 -p1
%patch1 -p1
# Fix file eof
sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt
%mvn_package :%{short_name}-testframework testframework
%mvn_file ':%{short_name}{,-testframework}' %{name}@1 %{short_name}@1
%mvn_package :commons-collections-testframework testframework
%mvn_file ':commons-collections{,-testframework}' %{name}@1 commons-collections@1
%build
# 2017-09-18 mizdebsk: Temporarly disable tests, they stopped working
# after Maven Surefire upgrade to 2.20, need to investigate why.
%mvn_build -- -DskipTests
ant tf.javadoc -Dtf.build.docs=target/site/apidocs/
%mvn_artifact %{short_name}:%{short_name}-testframework:%{version} target/%{short_name}-testframework-%{version}.jar
%mvn_build -- -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6
%install
%mvn_artifact commons-collections:commons-collections-testframework:%{version} target/commons-collections-testframework-%{version}.jar
%mvn_install
%files -f .mfiles
@ -84,8 +76,16 @@ ant tf.javadoc -Dtf.build.docs=target/site/apidocs/
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt NOTICE.txt
%changelog
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.2-13
- Mass rebuild for javapackages-tools 201902
* Fri Jun 28 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.2-12
- Enable tests
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.2-11
- Mass rebuild for javapackages-tools 201901
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild