diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2021-04-21 11:31:11 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2021-04-21 11:33:09 +0200 |
commit | e90a6173247f06514731825677f3fc67c62bdc52 (patch) | |
tree | db8f46d14a8d1ad03a4c0de15d3251df650083c3 /dev-java/commons-collections | |
parent | dev-java/commons-collections: fixed compilation of tests in 3.2.1-r3 (diff) | |
download | gentoo-e90a6173247f06514731825677f3fc67c62bdc52.tar.gz gentoo-e90a6173247f06514731825677f3fc67c62bdc52.tar.bz2 gentoo-e90a6173247f06514731825677f3fc67c62bdc52.zip |
dev-java/commons-collections: bump to 3.2.2
Bug: https://bugs.gentoo.org/739348
Closes: https://bugs.gentoo.org/784131
Closes: https://bugs.gentoo.org/780153
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/commons-collections')
3 files changed, 269 insertions, 0 deletions
diff --git a/dev-java/commons-collections/Manifest b/dev-java/commons-collections/Manifest index acb1b2798142..83ee54781b02 100644 --- a/dev-java/commons-collections/Manifest +++ b/dev-java/commons-collections/Manifest @@ -1,2 +1,3 @@ DIST commons-collections-3.2.1-src.tar.gz 609930 BLAKE2B 547b785b82e16f1c318fafb5761292c5fe8beb57dd4a4881cc16ef7df7328df279713442cd1fc4a64fad0d84457c06d5536c084fd8084f62495ce44bfde19a34 SHA512 8b9b5344528b3b8a53142abd944ff6b89cc149a3fa0c1eadf3f2172509499af5820ba86859e47fe7f15f994f680fa3c577c21891540b64f41f826babe81a0fc0 +DIST commons-collections-3.2.2-src.tar.gz 630693 BLAKE2B a70cebe9526291d5207db7edd7c9b50060413880d41dcb28c01cf05f7e00a9f5e1560012c3c3c763162412282db9512bc2b64a5788f210c5c8866943d912dafb SHA512 2e8ef638f07515b028a3e7e97851fcf1d9023a2c188e211bd1e936f35d3d91c2885adf3b1103ad17dfb7aeea6e7a67ce7826ee346a8a29c1aa7c6b0cf14e9230 DIST commons-collections4-4.1-src.tar.gz 704671 BLAKE2B dea1b630168373013ca937c9b02414b92845fdd9ddf7a22a05c4d7f8d30ff26d73f3a2d399d7a4c026f8ec43a282120fdf3d3cb1042a311c3b490ffed1774e30 SHA512 c5666f41b68c9fdba3731730595616b16f98579c077cf047f421a46729b5a65476a8707125a2c0b0c6c024ca94df8c2633123bd99e705149fcb1afadcd3bf68b diff --git a/dev-java/commons-collections/commons-collections-3.2.2.ebuild b/dev-java/commons-collections/commons-collections-3.2.2.ebuild new file mode 100644 index 000000000000..b127e357b051 --- /dev/null +++ b/dev-java/commons-collections/commons-collections-3.2.2.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="commons-collections:commons-collections:3.2.1" + +inherit java-pkg-2 java-ant-2 java-utils-2 + +DESCRIPTION="Jakarta-Commons Collections Component" +HOMEPAGE="https://commons.apache.org/collections/" +SRC_URI="mirror://apache/${PN/-//}/source/${P}-src.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + >=virtual/jdk-1.8:* + test? ( + dev-java/junit:0 + dev-java/ant-junit:0 + )" + +RDEPEND=">=virtual/jre-1.8:*" + +S="${WORKDIR}/${P}-src" + +PATCHES=( + "${FILESDIR}/${P}-fixes.patch" +) + +src_prepare() { + default +} + +src_compile() { + local antflags + if use test; then + antflags="tf.jar -Djunit.jar=$(java-pkg_getjars --build-only junit)" + fi + eant jar $(use_doc) ${antflags} +} + +src_test() { + if [[ "${ARCH}" = "ppc" ]]; then + einfo "tests are disabled on ppc" + else + ANT_TASKS="ant-junit" eant testjar -Djunit.jar="$(java-pkg_getjars junit)" + fi +} + +src_install() { + java-pkg_newjar build/${P}.jar ${PN}.jar + use test && \ + java-pkg_newjar build/${PN}-testframework-${PV}.jar \ + ${PN}-testframework.jar + + java-pkg_dohtml *.html + if use doc; then + java-pkg_dojavadoc build/docs/apidocs + fi + use source && java-pkg_dosrc src/java/* +} diff --git a/dev-java/commons-collections/files/commons-collections-3.2.2-fixes.patch b/dev-java/commons-collections/files/commons-collections-3.2.2-fixes.patch new file mode 100644 index 000000000000..24a7bb2d709c --- /dev/null +++ b/dev-java/commons-collections/files/commons-collections-3.2.2-fixes.patch @@ -0,0 +1,201 @@ +diff --git a/build.xml b/build.xml +index d6282d0..ea4c7b7 100644 +--- a/build.xml ++++ b/build.xml +@@ -154,8 +154,7 @@ + + <!-- NOTE: A jar built using JDK1.4 is incompatible with JDK1.2 --> + <jar jarfile="${build.jar.name}" +- basedir="${build.classes}" +- manifest="${build.conf}/MANIFEST.MF"/> ++ basedir="${build.classes}"/> + </target> + + <!-- ====================================================================== --> +diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java +index 7fec9af..53470d1 100644 +--- a/src/java/org/apache/commons/collections/MultiHashMap.java ++++ b/src/java/org/apache/commons/collections/MultiHashMap.java +@@ -331,7 +331,7 @@ public class MultiHashMap extends HashMap implements MultiMap { + * @param item the value to remove + * @return the value removed (which was passed in), null if nothing removed + */ +- public Object remove(Object key, Object item) { ++ public Object removeMapping(Object key, Object item) { + Collection valuesForKey = getCollection(key); + if (valuesForKey == null) { + return null; +diff --git a/src/java/org/apache/commons/collections/MultiMap.java b/src/java/org/apache/commons/collections/MultiMap.java +index be9455b..60375a6 100644 +--- a/src/java/org/apache/commons/collections/MultiMap.java ++++ b/src/java/org/apache/commons/collections/MultiMap.java +@@ -66,7 +66,7 @@ public interface MultiMap extends Map { + * @throws ClassCastException if the key or value is of an invalid type + * @throws NullPointerException if the key or value is null and null is invalid + */ +- public Object remove(Object key, Object item); ++ public Object removeMapping(Object key, Object item); + + //----------------------------------------------------------------------- + /** +diff --git a/src/java/org/apache/commons/collections/map/MultiKeyMap.java b/src/java/org/apache/commons/collections/map/MultiKeyMap.java +index 9e3e02d..65bffe9 100644 +--- a/src/java/org/apache/commons/collections/map/MultiKeyMap.java ++++ b/src/java/org/apache/commons/collections/map/MultiKeyMap.java +@@ -197,7 +197,7 @@ public class MultiKeyMap + * @param key2 the second key + * @return the value mapped to the removed key, null if key not in map + */ +- public Object remove(Object key1, Object key2) { ++ public Object removeMultiKey(Object key1, Object key2) { + int hashCode = hash(key1, key2); + int index = map.hashIndex(hashCode, map.data.length); + AbstractHashedMap.HashEntry entry = map.data[index]; +diff --git a/src/java/org/apache/commons/collections/map/MultiValueMap.java b/src/java/org/apache/commons/collections/map/MultiValueMap.java +index f44999b..fb1a4d1 100644 +--- a/src/java/org/apache/commons/collections/map/MultiValueMap.java ++++ b/src/java/org/apache/commons/collections/map/MultiValueMap.java +@@ -153,7 +153,7 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap { + * @param value the value to remove + * @return the value removed (which was passed in), null if nothing removed + */ +- public Object remove(Object key, Object value) { ++ public Object removeMapping(Object key, Object value) { + Collection valuesForKey = getCollection(key); + if (valuesForKey == null) { + return null; +diff --git a/src/test/org/apache/commons/collections/TestMultiHashMap.java b/src/test/org/apache/commons/collections/TestMultiHashMap.java +index eca833a..9d47438 100644 +--- a/src/test/org/apache/commons/collections/TestMultiHashMap.java ++++ b/src/test/org/apache/commons/collections/TestMultiHashMap.java +@@ -217,7 +217,7 @@ public class TestMultiHashMap extends AbstractTestMap { + MultiHashMap one = new MultiHashMap(); + Integer value = new Integer(1); + one.put("One", value); +- one.remove("One", value); ++ one.removeMapping("One", value); + + MultiHashMap two = new MultiHashMap(); + assertEquals(two, one); +@@ -269,7 +269,7 @@ public class TestMultiHashMap extends AbstractTestMap { + assertEquals(4, map.totalSize()); + map.remove("A"); + assertEquals(3, map.totalSize()); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(2, map.totalSize()); + } + +@@ -292,7 +292,7 @@ public class TestMultiHashMap extends AbstractTestMap { + map.remove("A"); + assertEquals(0, map.size("A")); + assertEquals(3, map.size("B")); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(0, map.size("A")); + assertEquals(2, map.size("B")); + } +@@ -464,11 +464,11 @@ public class TestMultiHashMap extends AbstractTestMap { + 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(null, map.removeMapping("C", "CA")); ++ assertEquals(null, map.removeMapping("A", "AD")); ++ assertEquals("AC", map.removeMapping("A", "AC")); ++ assertEquals("AB", map.removeMapping("A", "AB")); ++ assertEquals("AA", map.removeMapping("A", "AA")); + assertEquals(new MultiHashMap(), map); + } + +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 +diff --git a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java +index b1ee3d0..9845721 100644 +--- a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java ++++ b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java +@@ -315,10 +315,10 @@ public class TestMultiKeyMap extends AbstractTestIterableMap { + switch (key.size()) { + case 2: + assertEquals(true, multimap.containsKey(key.getKey(0), key.getKey(1))); +- assertEquals(value, multimap.remove(key.getKey(0), key.getKey(1))); ++ assertEquals(value, multimap.removeMultiKey(key.getKey(0), key.getKey(1))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); + assertEquals(size - 1, multimap.size()); +- assertEquals(null, multimap.remove(key.getKey(0), key.getKey(1))); ++ assertEquals(null, multimap.removeMultiKey(key.getKey(0), key.getKey(1))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); + break; + case 3: +diff --git a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java +index b9a5ac8..3138a83 100644 +--- a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java ++++ b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java +@@ -161,7 +161,7 @@ public class TestMultiValueMap extends TestCase { + MultiValueMap one = new MultiValueMap();
+ Integer value = new Integer(1);
+ one.put("One", value);
+- one.remove("One", value);
++ one.removeMapping("One", value);
+
+ MultiValueMap two = new MultiValueMap();
+ assertEquals(two, one);
+@@ -187,7 +187,7 @@ public class TestMultiValueMap extends TestCase { + assertEquals(4, map.totalSize());
+ map.remove("A");
+ assertEquals(3, map.totalSize());
+- map.remove("B", "BC");
++ map.removeMapping("B", "BC");
+ assertEquals(2, map.totalSize());
+ }
+
+@@ -204,7 +204,7 @@ public class TestMultiValueMap extends TestCase { + assertEquals(2, map.size());
+ map.remove("A");
+ assertEquals(2, map.size());
+- map.remove("B", "BC");
++ map.removeMapping("B", "BC");
+ assertEquals(2, map.size());
+ }
+
+@@ -227,7 +227,7 @@ public class TestMultiValueMap extends TestCase { + map.remove("A");
+ assertEquals(0, map.size("A"));
+ assertEquals(3, map.size("B"));
+- map.remove("B", "BC");
++ map.removeMapping("B", "BC");
+ assertEquals(0, map.size("A"));
+ assertEquals(2, map.size("B"));
+ }
+@@ -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(null, map.removeMapping("C", "CA"));
++ assertEquals(null, map.removeMapping("A", "AD"));
++ assertEquals("AC", map.removeMapping("A", "AC"));
++ assertEquals("AB", map.removeMapping("A", "AB"));
++ assertEquals("AA", map.removeMapping("A", "AA"));
+ assertEquals(new MultiValueMap(), map);
+ }
+
|