Fix ambiguous reference in AbstractTestCollection to build on Java 11.

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
This commit is contained in:
Roland Grunberg 2020-06-25 16:29:01 -04:00
parent ba46fb7e23
commit f1460dd439
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,13 @@
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

@ -3,13 +3,14 @@
Name: apache-%{short_name}
Version: 3.2.2
Release: 16%{?dist}
Release: 17%{?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
Patch1: 0001-Port-to-Java-11.patch
BuildArch: noarch
@ -56,6 +57,7 @@ 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
@ -82,6 +84,9 @@ sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt
%changelog
* Thu Jun 25 2020 Roland Grunberg <rgrunber@redhat.com> - 3.2.2-17
- Fix ambiguous reference in AbstractTestCollection to build on Java 11.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild