diff -Nru libcommons-collections4-java-4.1/build.properties.sample libcommons-collections4-java-4.2/build.properties.sample
--- libcommons-collections4-java-4.1/build.properties.sample 2013-11-13 21:15:50.000000000 +0000
+++ libcommons-collections4-java-4.2/build.properties.sample 1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##########################################################################
-# Sample Ant build.properties file
-#
-# This setup assumes dependent jars are in a local maven 2 repository.
-# However the jars are located, the properties ending in ".jar" need
-# expand to full paths to the jars.
-##########################################################################
-
-# Repository base path - unnecessary if full jar paths are provided below
-repository=${user.home}/.m2/repository
-junit.home=${repository}/junit/junit/4.11/
-hamcrest.home=${repository}/org/hamcrest/hamcrest-core/1.3/
-easymock.home=${repository}/org/easymock/easymock/3.2/
diff -Nru libcommons-collections4-java-4.1/build.xml libcommons-collections4-java-4.2/build.xml
--- libcommons-collections4-java-4.1/build.xml 2013-06-23 18:27:46.000000000 +0000
+++ libcommons-collections4-java-4.2/build.xml 1970-01-01 00:00:00.000000000 +0000
@@ -1,257 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -Nru libcommons-collections4-java-4.1/CONTRIBUTING.md libcommons-collections4-java-4.2/CONTRIBUTING.md
--- libcommons-collections4-java-4.1/CONTRIBUTING.md 2015-04-08 18:44:36.000000000 +0000
+++ libcommons-collections4-java-4.2/CONTRIBUTING.md 2018-07-08 00:18:18.000000000 +0000
@@ -50,48 +50,66 @@
+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
+ Make sure you have a [GitHub account](https://github.com/signup/free).
-+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons Collections's scope.
-+ Submit a ticket for your issue, assuming one does not already exist.
++ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons Collections's scope.
++ Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist.
+ Clearly describe the issue including steps to reproduce when it is a bug.
+ Make sure you fill in the earliest version that you know has the issue.
-+ Fork the repository on GitHub.
++ Find the corresponding [repository on GitHub](https://github.com/apache/?query=commons-),
+[fork](https://help.github.com/articles/fork-a-repo/) and check out your forked repository.
Making Changes
--------------
-+ Create a topic branch from where you want to base your work (this is usually the master/trunk branch).
++ Create a _topic branch_ for your isolated work.
+ * Usually you should base your branch on the `master` or `trunk` branch.
+ * A good topic branch name can be the JIRA bug id plus a keyword, e.g. `COLLECTIONS-123-InputStream`.
+ * If you have submitted multiple JIRA issues, try to maintain separate branches and pull requests.
+ Make commits of logical units.
+ * Make sure your commit messages are meaningful and in the proper format. Your commit message should contain the key of the JIRA issue.
+ * e.g. `COLLECTIONS-123: Close input stream earlier`
+ Respect the original code style:
+ Only use spaces for indentation.
- + Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
- + Check for unnecessary whitespace with git diff --check before committing.
-+ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
-+ Make sure you have added the necessary tests for your changes.
+ + Create minimal diffs - disable _On Save_ actions like _Reformat Source Code_ or _Organize Imports_. If you feel the source code should be reformatted create a separate PR for this change first.
+ + Check for unnecessary whitespace with `git diff` -- check before committing.
++ Make sure you have added the necessary tests for your changes, typically in `src/test/java`.
+ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.
Making Trivial Changes
----------------------
+The JIRA tickets are used to generate the changelog for the next release.
+
For changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
In this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.
+
Submitting Changes
------------------
-+ Sign the [Contributor License Agreement][cla] if you haven't already.
++ Sign and submit the Apache [Contributor License Agreement][cla] if you haven't already.
+ * Note that small patches & typical bug fixes do not require a CLA as
+ clause 5 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0.html#contributions)
+ covers them.
+ Push your changes to a topic branch in your fork of the repository.
-+ Submit a pull request to the repository in the apache organization.
++ Submit a _Pull Request_ to the corresponding repository in the `apache` organization.
+ * Verify _Files Changed_ shows only your intended changes and does not
+ include additional files like `target/*.class`
+ Update your JIRA ticket and include a link to the pull request in the ticket.
+If you prefer to not use GitHub, then you can instead use
+`git format-patch` (or `svn diff`) and attach the patch file to the JIRA issue.
+
+
Additional Resources
--------------------
+ [Contributing patches](https://commons.apache.org/patches.html)
-+ [Apache Commons Collections JIRA project page](https://issues.apache.org/jira/browse/COLLECTIONS)
++ [Apache Commons Collections JIRA project page][jira]
+ [Contributor License Agreement][cla]
+ [General GitHub documentation](https://help.github.com/)
-+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
++ [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
-+ #apachecommons IRC channel on freenode.org
++ `#apache-commons` IRC channel on `irc.freenode.net`
[cla]:https://www.apache.org/licenses/#clas
+[jira]:https://issues.apache.org/jira/browse/COLLECTIONS
diff -Nru libcommons-collections4-java-4.1/debian/changelog libcommons-collections4-java-4.2/debian/changelog
--- libcommons-collections4-java-4.1/debian/changelog 2015-12-06 21:47:29.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/changelog 2019-02-26 14:40:13.000000000 +0000
@@ -1,3 +1,21 @@
+libcommons-collections4-java (4.2-1~18.04) bionic; urgency=medium
+
+ * Backport for OpenJDK 11. LP: #1814133.
+
+ -- Matthias Klose Tue, 26 Feb 2019 15:40:13 +0100
+
+libcommons-collections4-java (4.2-1) unstable; urgency=medium
+
+ * New upstream release
+ * Fixed the build failure with Java 11 (Closes: #912477)
+ * Added the OSGi metadata
+ * Standards-Version updated to 4.2.1
+ * Switch to debhelper level 11
+ * Use salsa.debian.org Vcs-* URLs
+ * Track and download the new releases from the GitHub mirror
+
+ -- Emmanuel Bourg Tue, 06 Nov 2018 16:47:50 +0100
+
libcommons-collections4-java (4.1-1) unstable; urgency=medium
* New upstream release
diff -Nru libcommons-collections4-java-4.1/debian/compat libcommons-collections4-java-4.2/debian/compat
--- libcommons-collections4-java-4.1/debian/compat 2015-12-06 21:32:22.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/compat 2018-11-06 15:38:42.000000000 +0000
@@ -1 +1 @@
-9
+11
diff -Nru libcommons-collections4-java-4.1/debian/control libcommons-collections4-java-4.2/debian/control
--- libcommons-collections4-java-4.1/debian/control 2015-12-06 21:47:29.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/control 2018-11-06 15:38:42.000000000 +0000
@@ -3,14 +3,19 @@
Priority: optional
Maintainer: Debian Java Maintainers
Uploaders: Emmanuel Bourg
-Build-Depends: debhelper (>= 9), default-jdk, maven-debian-helper (>= 1.5)
-Build-Depends-Indep: default-jdk-doc,
- junit4,
- libeasymock-java,
- libmaven-javadoc-plugin-java
-Standards-Version: 3.9.6
-Vcs-Git: git://anonscm.debian.org/pkg-java/libcommons-collections4-java.git
-Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/libcommons-collections4-java.git
+Build-Depends:
+ debhelper (>= 11),
+ default-jdk,
+ default-jdk-doc,
+ junit4,
+ libcommons-parent-java (>= 39-3~),
+ libeasymock-java,
+ libmaven-bundle-plugin-java,
+ libmaven-javadoc-plugin-java,
+ maven-debian-helper (>= 2.0.2~)
+Standards-Version: 4.2.1
+Vcs-Git: https://salsa.debian.org/java-team/libcommons-collections4-java.git
+Vcs-Browser: https://salsa.debian.org/java-team/libcommons-collections4-java
Homepage: http://commons.apache.org/collections/
Package: libcommons-collections4-java
diff -Nru libcommons-collections4-java-4.1/debian/libcommons-collections4-java.poms libcommons-collections4-java-4.2/debian/libcommons-collections4-java.poms
--- libcommons-collections4-java-4.1/debian/libcommons-collections4-java.poms 2015-12-06 21:49:04.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/libcommons-collections4-java.poms 2018-11-06 15:38:42.000000000 +0000
@@ -25,4 +25,4 @@
# --site-xml=: Optional, the location for site.xml if it needs to be installed.
# Empty by default. [mh_install]
#
-pom.xml --no-parent --has-package-version
+pom.xml --has-package-version
diff -Nru libcommons-collections4-java-4.1/debian/maven.properties libcommons-collections4-java-4.2/debian/maven.properties
--- libcommons-collections4-java-4.1/debian/maven.properties 2015-12-06 21:32:22.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/maven.properties 2018-11-06 15:47:50.000000000 +0000
@@ -2,5 +2,4 @@
# For example:
# maven.test.skip=true
-maven.compiler.source=1.6
-maven.compiler.target=1.6
+maven.compiler.release=7
diff -Nru libcommons-collections4-java-4.1/debian/orig-tar.sh libcommons-collections4-java-4.2/debian/orig-tar.sh
--- libcommons-collections4-java-4.1/debian/orig-tar.sh 2015-12-06 21:32:22.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/orig-tar.sh 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-set -e
-
-PACKAGE=$(dpkg-parsechangelog -S Source)
-VERSION=$2
-TAR=../${PACKAGE}_${VERSION}.orig.tar.xz
-DIR=${PACKAGE}_${VERSION}
-TAG=$(echo "COLLECTIONS_$VERSION" | sed -re's,\.,_,')
-
-svn export http://svn.apache.org/repos/asf/commons/proper/collections/tags/${TAG} $DIR
-XZ_OPT=--best tar -c -J -f $TAR $DIR
-rm -rf $DIR ../$TAG
diff -Nru libcommons-collections4-java-4.1/debian/rules libcommons-collections4-java-4.2/debian/rules
--- libcommons-collections4-java-4.1/debian/rules 2015-12-06 21:47:20.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/rules 2018-11-06 15:38:42.000000000 +0000
@@ -8,5 +8,3 @@
override_dh_installchangelogs:
dh_installchangelogs RELEASE-NOTES.txt
-get-orig-source:
- uscan --download-current-version --force-download --no-symlink
diff -Nru libcommons-collections4-java-4.1/debian/watch libcommons-collections4-java-4.2/debian/watch
--- libcommons-collections4-java-4.1/debian/watch 2015-12-06 21:32:22.000000000 +0000
+++ libcommons-collections4-java-4.2/debian/watch 2018-11-06 15:47:50.000000000 +0000
@@ -1,4 +1,3 @@
-version=3
-opts="uversionmangle=s/_/./" \
- http://svn.apache.org/viewvc/commons/proper/collections/tags/ COLLECTIONS_([\d_]*)/ \
- debian debian/orig-tar.sh
+version=4
+opts="repack,compression=xz" \
+https://github.com/apache/commons-collections/tags .*/commons-collections-([\d.]+).tar.gz
diff -Nru libcommons-collections4-java-4.1/default.properties libcommons-collections4-java-4.2/default.properties
--- libcommons-collections4-java-4.1/default.properties 2015-11-25 21:52:13.000000000 +0000
+++ libcommons-collections4-java-4.2/default.properties 1970-01-01 00:00:00.000000000 +0000
@@ -1,87 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# $Id: default.properties 1716550 2015-11-25 21:52:13Z tn $
-
-# The location of the "junit.jar" JAR file
-junit.jar = ${junit.home}/junit-4.11.jar
-
-# The location of the "junit.jar" JAR file
-hamcrest.jar = ${hamcrest.home}/hamcrest-core-1.3.jar
-
-# The location of the Easymock jar
-easymock.jar = ${easymock.home}/easymock-3.2.jar
-
-# Whether or not to fork tests
-junit.fork = true
-
-# The name of this component
-component.name = commons-collections4
-
-# The primary package name of this component
-component.package = org.apache.commons.collections4
-
-# The title of this component
-component.title = Commons Collections
-
-# The current version number of this component
-component.version = 4.1
-
-# The name that is used to create the jar file
-final.name = ${component.name}-${component.version}
-
-# The base directory for compilation targets
-build.home = target
-
-# The base directory for component configuration files
-conf.home = src/conf
-
-# The base directory for component sources
-source.home = src/main/java
-
-# The base directory for unit test sources
-test.home = src/test/java
-
-# Should Java compilations set the 'debug' compiler option?
-compile.debug = true
-
-# Should Java compilations set the 'deprecation' compiler option?
-compile.deprecation = true
-
-# Should Java compilations set the 'optimize' compiler option?
-compile.optimize = true
-
-# Generate class files for specific VM version (e.g., 1.1 or 1.2).
-# Note that the default value depends on the JVM that is running Ant.
-# In particular, if you use JDK 1.4+ the generated classes will not be usable
-# for a 1.1 Java VM unless you explicitly set this attribute to the value 1.1
-# (which is the default value for JDK 1.1 to 1.3).
-compile.target = 1.6
-
-# Specifies the source version for the Java compiler.
-# Corresponds to the source attribute for the ant javac task.
-# Valid values are 1.3, 1.4, 1.5.
-compile.source = 1.6
-
-# Specifies the source encoding.
-compile.encoding = ISO-8859-1
-
-# Should all tests fail if one does?
-test.failonerror = true
-
-# The test runner to execute
-test.runner = junit.textui.TestRunner
diff -Nru libcommons-collections4-java-4.1/DEVELOPERS-GUIDE.html libcommons-collections4-java-4.2/DEVELOPERS-GUIDE.html
--- libcommons-collections4-java-4.1/DEVELOPERS-GUIDE.html 2012-06-23 15:49:16.000000000 +0000
+++ libcommons-collections4-java-4.2/DEVELOPERS-GUIDE.html 2018-07-08 00:18:18.000000000 +0000
@@ -24,7 +24,7 @@
The Apache Commons Collections Package
Developers Guide
-$Id: DEVELOPERS-GUIDE.html 1353152 2012-06-23 15:49:16Z tn $
+$Id$ [Introduction][Collection Interfaces][Collection Implementations]
diff -Nru libcommons-collections4-java-4.1/doap_collections.rdf libcommons-collections4-java-4.2/doap_collections.rdf
--- libcommons-collections4-java-4.1/doap_collections.rdf 2015-11-14 13:37:20.000000000 +0000
+++ libcommons-collections4-java-4.2/doap_collections.rdf 1970-01-01 00:00:00.000000000 +0000
@@ -1,80 +0,0 @@
-
-
-
-
- Apache Commons Collections
-
- Java
-
-
-
-
-
- Commons Collections
- Types that extend and augment the Java Collections Framework.
-
-
-
-
-
-
-
-
- commons-collections
- 2013-11-24
- 4.0
-
-
-
-
- commons-collections
- 2015-11-14
- 3.2.2
-
-
-
-
- commons-collections
- 2008-04-15
- 3.2.1
-
-
-
-
- commons-collections
- 2006-05-14
- 3.2
-
-
-
-
- commons-collections
- 2004-06-23
- 3.1
-
-
-
-
- commons-collections
- 2004-06-23
- 2.1.1
-
-
-
-
-
diff -Nru libcommons-collections4-java-4.1/NOTICE.txt libcommons-collections4-java-4.2/NOTICE.txt
--- libcommons-collections4-java-4.1/NOTICE.txt 2015-01-07 21:02:51.000000000 +0000
+++ libcommons-collections4-java-4.2/NOTICE.txt 2018-07-08 00:18:18.000000000 +0000
@@ -1,5 +1,5 @@
Apache Commons Collections
-Copyright 2001-2015 The Apache Software Foundation
+Copyright 2001-2018 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff -Nru libcommons-collections4-java-4.1/pom.xml libcommons-collections4-java-4.2/pom.xml
--- libcommons-collections4-java-4.1/pom.xml 2015-11-25 21:52:13.000000000 +0000
+++ libcommons-collections4-java-4.2/pom.xml 2018-07-08 00:18:18.000000000 +0000
@@ -19,12 +19,11 @@
org.apache.commonscommons-parent
- 38
+ 474.0.0
- org.apache.commonscommons-collections4
- 4.1
+ 4.2Apache Commons Collections2001
@@ -38,9 +37,9 @@
- scm:svn:http://svn.apache.org/repos/asf/commons/proper/collections/trunk
- scm:svn:https://svn.apache.org/repos/asf/commons/proper/collections/trunk
- http://svn.apache.org/viewvc/commons/proper/collections/trunk
+ scm:git:http://git-wip-us.apache.org/repos/asf/commons-collections.git
+ scm:git:https://git-wip-us.apache.org/repos/asf/commons-collections.git
+ https://git-wip-us.apache.org/repos/asf?p=commons-collections.git
@@ -65,7 +64,7 @@
morgand
- Gary D. Gregory
+ Gary Gregoryggregory
@@ -97,10 +96,6 @@
adriannistor
- Phil Steitz
- psteitz
-
- Arun M. Thomasamamment
@@ -112,6 +107,10 @@
Henri Yandellbayard
+
+ Rob Tompkins
+ chtompki
+
@@ -436,19 +435,28 @@
Goncalo Marques
+
+ Vamsi Kavuri
+ junitjunit
- 4.11
+ 4.12testorg.easymockeasymock
- 3.2
+ 3.6
+ test
+
+
+ org.apache.commons
+ commons-lang3
+ 3.7test
@@ -464,11 +472,11 @@
UTF-8UTF-8
- 1.6
- 1.6
+ 1.7
+ 1.7
- collections4
+ collections
+ org.apache.commons.collections4
- 4.1
- (Java 6.0+)
+ 4.2
+ (Requires Java 7 or later)
- 3.2.2
- (Requires Java 1.3 or later)
+ 4.1
+ (Requires Java 6 or later)commons-collections-${commons.release.2.version}
+
+ 3.2.2
+ (Requires Java 1.3 or later)
+
+ commons-collections-${commons.release.3.version}
+
COLLECTIONS12310465
- RC2
- 2.9.1
+ RC1
+ 3.0.0collectionshttps://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-collectionssite-content
-
- 2.9.1
+
+ 2.8
+
+
+ 4.1
+ true
+ Gary Gregory
+ 86FDC7E2A11262CB
+
+ clean verify apache-rat:check clirr:check javadoc:javadocorg.apache.maven.plugins
@@ -532,11 +554,22 @@
+ org.apache.rat
+ apache-rat-plugin
+
+
+ site-content/**/*
+ src/test/resources/data/test/*
+
+
+
+ maven-checkstyle-plugin${checkstyle.version}${basedir}/src/conf/checkstyle.xmlfalse
+ ${basedir}/src/conf/checkstyle-suppressions.xml
@@ -548,6 +581,25 @@
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ test-jar
+
+
+
+
+
+
+
+ org.apache.commons.collections4
+
+
+
+
@@ -609,7 +661,7 @@
org.codehaus.mojofindbugs-maven-plugin
- 2.5.5
+ ${commons.findbugs.version}NormalDefault
@@ -618,7 +670,7 @@
maven-pmd-plugin
- 2.7.1
+ 3.10.0${maven.compiler.target}
@@ -631,18 +683,6 @@
-
- org.apache.rat
- apache-rat-plugin
-
-
- site-content/**/*
- src/test/resources/data/test/*
- maven-eclipse.xml
- .travis.yml
-
-
-
@@ -659,7 +699,7 @@
org.apache.maven.pluginsmaven-antrun-plugin
- 1.7
+ 1.8prepare-checkout
@@ -691,40 +731,17 @@
-
- travis
+ java9
-
- env.TRAVIS
- true
-
+ 9
- true
+
+ 3.0.1
+
+ true
-
-
-
- org.jacoco
- jacoco-maven-plugin
- ${commons.jacoco.version}
-
-
- prepare-agent
-
- prepare-agent
-
-
-
-
-
- org.eluder.coveralls
- coveralls-maven-plugin
- 3.1.0
-
-
-
diff -Nru libcommons-collections4-java-4.1/README.md libcommons-collections4-java-4.2/README.md
--- libcommons-collections4-java-4.1/README.md 2015-11-25 19:39:02.000000000 +0000
+++ libcommons-collections4-java-4.2/README.md 2018-07-08 00:18:18.000000000 +0000
@@ -43,18 +43,18 @@
Apache Commons Collections
===================
-[![Build Status](https://travis-ci.org/apache/commons-collections.svg?branch=trunk)](https://travis-ci.org/apache/commons-collections)
-[![Coverage Status](https://coveralls.io/repos/apache/commons-collections/badge.svg?branch=trunk&service=github)](https://coveralls.io/github/apache/commons-collections?branch=trunk)
+[![Build Status](https://travis-ci.org/apache/commons-collections.svg)](https://travis-ci.org/apache/commons-collections)
+[![Coverage Status](https://coveralls.io/repos/apache/commons-collections/badge.svg)](https://coveralls.io/r/apache/commons-collections)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-collections4/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-collections4/)
-[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
+[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-collections4/4.2.svg)](https://javadoc.io/doc/org.apache.commons/commons-collections4/4.2)
The Apache Commons Collections package contains types that extend and augment the Java Collections Framework.
Documentation
-------------
-More information can be found on the [homepage](https://commons.apache.org/proper/commons-collections).
-The [JavaDoc](https://commons.apache.org/proper/commons-collections/javadocs/api-release) can be browsed.
+More information can be found on the [Apache Commons Collections homepage](https://commons.apache.org/proper/commons-collections).
+The [Javadoc](https://commons.apache.org/proper/commons-collections/javadocs/api-release) can be browsed.
Questions related to the usage of Apache Commons Collections should be posted to the [user mailing list][ml].
Where can I get the latest release?
@@ -67,14 +67,14 @@
org.apache.commonscommons-collections4
- 4.0
+ 4.2
```
Contributing
------------
-We accept PRs via github. The [developer mailing list][ml] is the main channel of communication for contributors.
+We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
There are some guidelines which will make applying PRs easier for us:
+ No tabs! Please use spaces for indentation.
+ Respect the code style.
@@ -86,7 +86,9 @@
License
-------
-Code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0.txt).
+This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
+
+See the `NOTICE.txt` file for required notices and attributions.
Donations
---------
@@ -96,8 +98,8 @@
--------------------
+ [Apache Commons Homepage](https://commons.apache.org/)
-+ [Apache Bugtracker (JIRA)](https://issues.apache.org/jira/)
++ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/COLLECTIONS)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
-+ #apachecommons IRC channel on freenode.org
++ `#apache-commons` IRC channel on `irc.freenode.org`
[ml]:https://commons.apache.org/mail-lists.html
diff -Nru libcommons-collections4-java-4.1/RELEASE-NOTES.txt libcommons-collections4-java-4.2/RELEASE-NOTES.txt
--- libcommons-collections4-java-4.1/RELEASE-NOTES.txt 2015-11-22 00:37:47.000000000 +0000
+++ libcommons-collections4-java-4.2/RELEASE-NOTES.txt 2018-07-08 00:18:18.000000000 +0000
@@ -1,3 +1,51 @@
+ Apache Apache Commons Collections 4.2 RELEASE NOTES
+
+The Apache Commons Collections package contains types that extend and augment the Java Collections Framework.
+
+Update from Java 6 to Java 7, bug fixes, and small changes.
+
+Changes in this version include:
+
+New features:
+o COLLECTIONS-681: Add test for MultiSetUtils Thanks to Stephan Fuhrmann.
+o COLLECTIONS-658: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.
+o COLLECTIONS-589: Add null-safe MapUtils.size(Map, ?>) method. Thanks to Gary Gregory.
+o COLLECTIONS-586: PatriciaTrie prefixMap clear throws NullPointerException. Thanks to Shailender Bathula, Gary Gregory.
+o COLLECTIONS-654: Add class SortedProperties to sort keys.
+o COLLECTIONS-668: Add CollectionUtils containsAny method for primitive array: org.apache.commons.collections4.CollectionUtils.containsAny(Collection>, T...). Thanks to Gary Gregory.
+o COLLECTIONS-575: Synchronized queue wrapper in QueueUtils. Thanks to Guram Savinov, Grzegorz Rożniecki, Bruno P. Kinoshita, Gary Gregory.
+o COLLECTIONS-670: Add org.apache.commons.collections4.IteratorUtils.first(Iterator). Thanks to Gary Gregory.
+o COLLECTIONS-671: Add org.apache.commons.collections4.IterableUtils.first(Iterable). Thanks to Gary Gregory.
+
+Fixed Bugs:
+o COLLECTIONS-599: HashEntry array object naming data initialized with double the size during deserialization. Thanks to Tejas Patel, Saleem Akbar, Gary Gregory.
+o COLLECTIONS-662: Unit tests MapUtilsTest and ListIteratorWrapperTest no longer fail on Java 9. Thanks to Vamsi Kavuri.
+o COLLECTIONS-661: Intermittent test failures in Windows for HashSetValuedHashMap.
+o COLLECTIONS-660: Uncomment test in AbstractMapTest regarding LRUMap equals.
+o COLLECTIONS-656: Fix site build on Java 8.
+o COLLECTIONS-653: Update Javadoc to Build on Java 1.8.
+o COLLECTIONS-606: Build status, Coverage status and Maven central weren't in README.md Thanks to Vamsi Kavuri.
+o COLLECTIONS-594: Web site spelling error: MultiValuedMapeList. Thanks to Javen O'Neal.
+o COLLECTIONS-597: Correction of Javadoc for org.apache.commons.collections4.functors.CatchAndRethrowClosure. Thanks to Enrique.
+o COLLECTIONS-678: The verification of unsupported iterator methods is not complete. Thanks to Oscar Luis Vera Pérez.
+o COLLECTIONS-673: ListUtils.partition potential integer overflow. Thanks to John Mark, Stephan Fuhrmann.
+
+Changes:
+o COLLECTIONS-602: Improve efficiency of DefaultedMap.get. Thanks to John Mark.
+o COLLECTIONS-603: Small improvements for generics, conditional statements, and warnings suppressions. Thanks to Artem Konovalov.
+o COLLECTIONS-655: Update platform from Java 6 to Java 7.
+o COLLECTIONS-666: org.apache.commons.collections4.ListUtils.union(List, List) should pre-allocate result list. Thanks to BELUGA BEHR.
+o COLLECTIONS-669: Update org.apache.commons.collections4.CollectionUtils.addAll(Collection, C[]) to addAll(Collection, C...). Thanks to BELUGA BEHR, Gary Gregory.
+
+
+For complete information on Apache Commons Collections, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the Apache Apache Commons Collections website:
+
+http://commons.apache.org/proper/commons-collections/
+
+Download page: http://commons.apache.org/proper/commons-collections/download_pool.cgi
+
+===============================================================================
Apache Commons Collections
Version 4.1
diff -Nru libcommons-collections4-java-4.1/src/assembly/src.xml libcommons-collections4-java-4.2/src/assembly/src.xml
--- libcommons-collections4-java-4.1/src/assembly/src.xml 2013-06-23 18:27:46.000000000 +0000
+++ libcommons-collections4-java-4.2/src/assembly/src.xml 2018-07-08 00:18:18.000000000 +0000
@@ -24,15 +24,14 @@
- build.xml
- default.properties
- build.properties.sample
+ .travis.yml
+ CONTRIBUTING.mdDEVELOPERS-GUIDE.htmlLICENSE.txtNOTICE.txtpom.xmlPROPOSAL.html
- README.txt
+ README.mdRELEASE-NOTES.txt
diff -Nru libcommons-collections4-java-4.1/src/changes/changes.xml libcommons-collections4-java-4.2/src/changes/changes.xml
--- libcommons-collections4-java-4.1/src/changes/changes.xml 2015-11-22 21:20:23.000000000 +0000
+++ libcommons-collections4-java-4.2/src/changes/changes.xml 2018-07-08 00:18:18.000000000 +0000
@@ -20,7 +20,83 @@
Commons Collections Changes
-
+
+
+ Add test for MultiSetUtils
+
+
+ HashEntry array object naming data initialized with double the size during deserialization.
+
+
+ Unit tests MapUtilsTest and ListIteratorWrapperTest no longer fail on Java 9.
+
+
+ Intermittent test failures in Windows for HashSetValuedHashMap.
+
+
+ Uncomment test in AbstractMapTest regarding LRUMap equals.
+
+
+ Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.
+
+
+ Fix site build on Java 8.
+
+
+ Update Javadoc to Build on Java 1.8.
+
+
+ Build status, Coverage status and Maven central weren't in README.md
+
+
+ Improve efficiency of DefaultedMap.get.
+
+
+ Small improvements for generics, conditional statements, and warnings suppressions.
+
+
+ Update platform from Java 6 to Java 7.
+
+
+ Web site spelling error: MultiValuedMapeList.
+
+
+ Correction of Javadoc for org.apache.commons.collections4.functors.CatchAndRethrowClosure.
+
+
+ Add null-safe MapUtils.size(Map<?, ?>) method.
+
+
+ PatriciaTrie prefixMap clear throws NullPointerException.
+
+
+ Add class SortedProperties to sort keys.
+
+
+ org.apache.commons.collections4.ListUtils.union(List, List) should pre-allocate result list.
+
+
+ Update org.apache.commons.collections4.CollectionUtils.addAll(Collection<C>, C[]) to addAll(Collection<C>, C...).
+
+
+ Add CollectionUtils containsAny method for primitive array: org.apache.commons.collections4.CollectionUtils.containsAny(Collection<?>, T...).
+
+
+ Synchronized queue wrapper in QueueUtils.
+
+
+ Add org.apache.commons.collections4.IteratorUtils.first(Iterator).
+
+
+ Add org.apache.commons.collections4.IterableUtils.first(Iterable).
+
+
+ The verification of unsupported iterator methods is not complete.
+
+
+ ListUtils.partition potential integer overflow.
+
+
Added new interfaces "MultiValuedMap", "ListValuedMap" and "SetValuedMap"
@@ -131,7 +207,7 @@
"AbstractHashedMap" still inherits from "AbstractMap", contrary to what
- the class javadoc stated. The inheritance will now be removed in v5.0.
+ the class javadoc stated. The inheritance will now be removed in v5.0.
Changed scope of "CircularFifoQueue#isAtFullCapacity()" to public.
@@ -232,7 +308,7 @@
Resolved generic parameter inconsistency for various static fields, e.g. BagUtils.EMPTY_BAG,
TruePredicate.INSTANCE and many others. All accessible static fields use raw types so that
they can be used directly without explicit casting. To avoid compiler warnings about unchecked
- conversion and/or rawtypes use the corresponding factory methods, e.g. BagUtils.emptyBag().
+ conversion and/or rawtypes use the corresponding factory methods, e.g. BagUtils.emptyBag().
Renamed methods "V MultiKeyMap#remove(Object, Object, ...)" to
@@ -246,7 +322,7 @@
Refactored the test framework for Bag implementations to extend from
"AbstractCollectionTest" by decorating the concrete Bag instance with
- a CollectionBag or CollectionSortedBag.
+ a CollectionBag or CollectionSortedBag.
"CollectionBag" will now also respect the contract of the decorated bag in case
@@ -306,19 +382,19 @@
Added bag decorator "CollectionBag" which decorates a bag to make it comply with the
Collection contract.
-
+
Replaced "Collection" with "Iterable" for method arguments where applicable.
-
+
Added "PushbackIterator" decorator to support pushback of elements during iteration.
-
+
Added "PeekingIterator" decorator to support one-element lookahead during iteration.
Added additional clarification to javadoc of interface "Put" wrt return type of
- "put(Object, Object)" method.
+ "put(Object, Object)" method.
Changed "IteratorChain" to use internally a "Queue" instead of a "List". Iterators are
@@ -347,7 +423,7 @@
Several closure and transformer implementations in the functors package
will now copy an array as input to their constructor (e.g. ChainedClosure).
-
+
Change base package to org.apache.commons.collections4.
@@ -445,7 +521,7 @@
Improved performance of "SetUniqueList#removeAll".
- Improved performance of "ListOrderedSet#remove(Object)" in case the object is
+ Improved performance of "ListOrderedSet#remove(Object)" in case the object is
not contained in the Set.
diff -Nru libcommons-collections4-java-4.1/src/changes/release-notes.vm libcommons-collections4-java-4.2/src/changes/release-notes.vm
--- libcommons-collections4-java-4.1/src/changes/release-notes.vm 2012-07-15 11:54:30.000000000 +0000
+++ libcommons-collections4-java-4.2/src/changes/release-notes.vm 2018-07-08 00:18:18.000000000 +0000
@@ -136,3 +136,5 @@
patches, or suggestions for improvement, see the Apache ${project.name} website:
${project.url}
+
+Download page: ${project.url}download_pool.cgi
diff -Nru libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/ArrayStack.java libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/ArrayStack.java
--- libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/ArrayStack.java 2013-04-30 18:55:24.000000000 +0000
+++ libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/ArrayStack.java 2018-07-08 00:18:18.000000000 +0000
@@ -36,9 +36,9 @@
* Note: From version 4.0 onwards, this class does not implement the
* removed {@code Buffer} interface anymore.
*
+ * @param the type of elements in this list
* @see java.util.Stack
* @since 1.0
- * @version $Id: ArrayStack.java 1477779 2013-04-30 18:55:24Z tn $
* @deprecated use {@link java.util.ArrayDeque} instead (available from Java 1.6)
*/
@Deprecated
@@ -88,9 +88,8 @@
final int n = size();
if (n <= 0) {
throw new EmptyStackException();
- } else {
- return get(n - 1);
}
+ return get(n - 1);
}
/**
@@ -106,9 +105,8 @@
final int m = (size() - n) - 1;
if (m < 0) {
throw new EmptyStackException();
- } else {
- return get(m);
}
+ return get(m);
}
/**
@@ -121,9 +119,8 @@
final int n = size();
if (n <= 0) {
throw new EmptyStackException();
- } else {
- return remove(n - 1);
}
+ return remove(n - 1);
}
/**
diff -Nru libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/ArrayUtils.java libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/ArrayUtils.java
--- libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/ArrayUtils.java 1970-01-01 00:00:00.000000000 +0000
+++ libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/ArrayUtils.java 2018-07-08 00:18:18.000000000 +0000
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.collections4;
+
+/**
+ *
+ * Operations on arrays, primitive arrays (like {@code int[]}) and primitive wrapper arrays (like {@code Integer[]}).
+ *
+ *
+ * This class tries to handle {@code null} input gracefully. An exception will not be thrown for a {@code null} array
+ * input. However, an Object array that contains a {@code null} element may throw an exception. Each method documents
+ * its behaviour.
+ *
+ *
+ * Package private, might move to an internal package if this needs to be public.
+ *
+ *
+ * #ThreadSafe#
+ *
+ *
+ * @since 4.2 (Copied from Apache Commons Lang.)
+ *
+ */
+class ArrayUtils {
+
+ /**
+ * The index value when an element is not found in a list or array: {@code -1}. This value is returned by methods in
+ * this class and can also be used in comparisons with values returned by various method from
+ * {@link java.util.List}.
+ */
+ static final int INDEX_NOT_FOUND = -1;
+
+ /**
+ *
+ * Checks if the object is in the given array.
+ *
+ *
+ *
+ * The method returns {@code false} if a {@code null} array is passed in.
+ *
+ *
+ * @param array
+ * the array to search through
+ * @param objectToFind
+ * the object to find
+ * @return {@code true} if the array contains the object
+ */
+ static boolean contains(final Object[] array, final Object objectToFind) {
+ return indexOf(array, objectToFind) != INDEX_NOT_FOUND;
+ }
+
+ /**
+ *
+ * Finds the index of the given object in the array.
+ *
+ *
+ *
+ * This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
+ *
+ *
+ * @param array
+ * the array to search through for the object, may be {@code null}
+ * @param objectToFind
+ * the object to find, may be {@code null}
+ * @return the index of the object within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or
+ * {@code null} array input
+ */
+ static int indexOf(final T[] array, final Object objectToFind) {
+ return indexOf(array, objectToFind, 0);
+ }
+
+ /**
+ *
+ * Finds the index of the given object in the array starting at the given index.
+ *
+ *
+ *
+ * This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
+ *
+ *
+ *
+ * A negative startIndex is treated as zero. A startIndex larger than the array length will return
+ * {@link #INDEX_NOT_FOUND} ({@code -1}).
+ *
+ *
+ * @param array
+ * the array to search through for the object, may be {@code null}
+ * @param objectToFind
+ * the object to find, may be {@code null}
+ * @param startIndex
+ * the index to start searching at
+ * @return the index of the object within the array starting at the index, {@link #INDEX_NOT_FOUND} ({@code -1}) if
+ * not found or {@code null} array input
+ */
+ static int indexOf(final Object[] array, final Object objectToFind, int startIndex) {
+ if (array == null) {
+ return INDEX_NOT_FOUND;
+ }
+ if (startIndex < 0) {
+ startIndex = 0;
+ }
+ if (objectToFind == null) {
+ for (int i = startIndex; i < array.length; i++) {
+ if (array[i] == null) {
+ return i;
+ }
+ }
+ } else {
+ for (int i = startIndex; i < array.length; i++) {
+ if (objectToFind.equals(array[i])) {
+ return i;
+ }
+ }
+ }
+ return INDEX_NOT_FOUND;
+ }
+
+}
diff -Nru libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java
--- libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java 2015-06-22 13:00:27.000000000 +0000
+++ libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/bag/AbstractBagDecorator.java 2018-07-08 00:18:18.000000000 +0000
@@ -26,8 +26,8 @@
*
* Methods are forwarded directly to the decorated bag.
*
+ * @param the type of elements in this bag
* @since 3.0
- * @version $Id: AbstractBagDecorator.java 1686855 2015-06-22 13:00:27Z tn $
*/
public abstract class AbstractBagDecorator
extends AbstractCollectionDecorator implements Bag {
diff -Nru libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
--- libcommons-collections4-java-4.1/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java 2015-06-11 11:57:24.000000000 +0000
+++ libcommons-collections4-java-4.2/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java 2018-07-08 00:18:18.000000000 +0000
@@ -38,8 +38,8 @@
* map will be used to map bag elements to a number; the number represents the
* number of occurrences of that element in the bag.
*
+ * @param the type of elements in this bag
* @since 3.0 (previously DefaultMapBag v2.0)
- * @version $Id: AbstractMapBag.java 1684859 2015-06-11 11:57:24Z tn $
*/
public abstract class AbstractMapBag implements Bag {
@@ -141,7 +141,7 @@
if (coll instanceof Bag) {
return containsAll((Bag>) coll);
}
- return containsAll(new HashBag