public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-java/commons-collections/files/, dev-java/commons-collections/
@ 2021-04-21  9:33 Miroslav Šulc
  0 siblings, 0 replies; 2+ messages in thread
From: Miroslav Šulc @ 2021-04-21  9:33 UTC (permalink / raw
  To: gentoo-commits

commit:     510bcd96906092e82a7549d8fcb0477494d7b02b
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 21 08:48:14 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Apr 21 09:33:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=510bcd96

dev-java/commons-collections: fixed compilation of tests in 3.2.1-r3

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../commons-collections/commons-collections-3.2.1-r3.ebuild | 11 +++++++----
 .../files/commons-collections-3.2.1-fix-tests.patch         | 13 +++++++++++++
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild b/dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild
index cfd46905336..75a4556fc9c 100644
--- a/dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild
+++ b/dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild
@@ -19,17 +19,20 @@ IUSE="test"
 RESTRICT="!test? ( test )"
 
 DEPEND="
-	>=virtual/jdk-1.8
+	>=virtual/jdk-1.8:*
 	test? (
 		dev-java/junit:0
 		dev-java/ant-junit:0
 	)"
 
-RDEPEND=">=virtual/jre-1.8"
+RDEPEND=">=virtual/jre-1.8:*"
 
 S="${WORKDIR}/${P}-src"
 
-PATCHES=( "${FILESDIR}/${P}-Java-8.patch" )
+PATCHES=(
+	"${FILESDIR}/${P}-Java-8.patch"
+	"${FILESDIR}/${P}-fix-tests.patch"
+)
 
 src_prepare() {
 	default
@@ -38,7 +41,7 @@ src_prepare() {
 src_compile() {
 	local antflags
 	if use test; then
-		antflags="tf.jar -Djunit.jar=$(java-pkg_getjars junit)"
+		antflags="tf.jar -Djunit.jar=$(java-pkg_getjars --build-only junit)"
 	fi
 	eant jar $(use_doc) ${antflags}
 }

diff --git a/dev-java/commons-collections/files/commons-collections-3.2.1-fix-tests.patch b/dev-java/commons-collections/files/commons-collections-3.2.1-fix-tests.patch
new file mode 100644
index 00000000000..9ba66eb6e4a
--- /dev/null
+++ b/dev-java/commons-collections/files/commons-collections-3.2.1-fix-tests.patch
@@ -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 1c01b53..aea6edf 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/commons-collections/files/, dev-java/commons-collections/
@ 2021-04-27  5:36 Miroslav Šulc
  0 siblings, 0 replies; 2+ messages in thread
From: Miroslav Šulc @ 2021-04-27  5:36 UTC (permalink / raw
  To: gentoo-commits

commit:     c7b2e1ce22d34cb19c5e7d03c16fcabe3420d06a
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 27 05:36:49 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Tue Apr 27 05:36:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7b2e1ce

dev-java/commons-collections: removed obsolete and vulnerable 3.2.1-r1

Bug: https://bugs.gentoo.org/739348
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/commons-collections/Manifest              |   1 -
 .../commons-collections-3.2.1-r1.ebuild            |  74 ----------
 .../files/commons-collections-3.2.1-Java-8.patch   | 160 ---------------------
 dev-java/commons-collections/metadata.xml          |   3 -
 4 files changed, 238 deletions(-)

diff --git a/dev-java/commons-collections/Manifest b/dev-java/commons-collections/Manifest
index 83ee54781b0..02508b4a856 100644
--- a/dev-java/commons-collections/Manifest
+++ b/dev-java/commons-collections/Manifest
@@ -1,3 +1,2 @@
-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.1-r1.ebuild b/dev-java/commons-collections/commons-collections-3.2.1-r1.ebuild
deleted file mode 100644
index ef22afeed88..00000000000
--- a/dev-java/commons-collections/commons-collections-3.2.1-r1.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-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 epatch
-
-DESCRIPTION="Jakarta-Commons Collections Component"
-HOMEPAGE="http://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-framework"
-RESTRICT="!test? ( test )"
-
-CDEPEND="
-	test-framework? (
-		dev-java/junit:0
-		dev-java/ant-junit:0
-	)
-	"
-DEPEND=">=virtual/jdk-1.6
-	${CDEPEND}"
-RDEPEND=">=virtual/jre-1.6
-	${CDEPEND}"
-
-S="${WORKDIR}/${P}-src"
-
-java_prepare() {
-	# Check for VM version.
-	java-pkg_is-vm-version-ge 1.8
-	if [[ $? -eq 0 ]]; then
-		einfo "You are running a JVM greater or equal than version 1.8."
-		epatch "${FILESDIR}"/${P}-Java-8.patch
-	fi
-}
-
-src_compile() {
-	local antflags
-	if use test-framework; then
-		antflags="tf.jar -Djunit.jar=$(java-pkg_getjars junit)"
-		#no support for installing two sets of javadocs via dojavadoc atm
-		#use doc && antflags="${antflags} tf.javadoc"
-	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-framework && \
-		java-pkg_newjar build/${PN}-testframework-${PV}.jar \
-			${PN}-testframework.jar
-
-	dodoc README.txt
-	java-pkg_dohtml *.html || die
-	if use doc; then
-		java-pkg_dojavadoc build/docs/apidocs
-		#use test-framework && java-pkg_dojavadoc build/docs/testframework
-	fi
-	use source && java-pkg_dosrc src/java/*
-}

diff --git a/dev-java/commons-collections/files/commons-collections-3.2.1-Java-8.patch b/dev-java/commons-collections/files/commons-collections-3.2.1-Java-8.patch
deleted file mode 100644
index 1a5ebe241f7..00000000000
--- a/dev-java/commons-collections/files/commons-collections-3.2.1-Java-8.patch
+++ /dev/null
@@ -1,160 +0,0 @@
---- a/src/java/org/apache/commons/collections/map/MultiValueMap.java
-+++ b/src/java/org/apache/commons/collections/map/MultiValueMap.java
-@@ -153,7 +153,7 @@
-      * @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;
---- a/src/java/org/apache/commons/collections/MultiHashMap.java
-+++ b/src/java/org/apache/commons/collections/MultiHashMap.java
-@@ -331,7 +331,7 @@
-      * @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;
---- a/src/java/org/apache/commons/collections/MultiMap.java
-+++ b/src/java/org/apache/commons/collections/MultiMap.java
-@@ -66,7 +66,7 @@
-      * @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);
- 
-     //-----------------------------------------------------------------------
-     /**
---- a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java
-+++ b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java
-@@ -160,7 +160,7 @@
-         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);
-@@ -186,7 +186,7 @@
-         assertEquals(4, map.totalSize());
-         map.remove("A");
-         assertEquals(3, map.totalSize());
--        map.remove("B", "BC");
-+        map.removeMapping("B", "BC");
-         assertEquals(2, map.totalSize());
-     }
-     
-@@ -203,7 +203,7 @@
-         assertEquals(2, map.size());
-         map.remove("A");
-         assertEquals(2, map.size());
--        map.remove("B", "BC");
-+        map.removeMapping("B", "BC");
-         assertEquals(2, map.size());
-     }
-     
-@@ -226,7 +226,7 @@
-         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"));
-     }
-@@ -327,11 +327,11 @@
-         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);
-     }
- 
---- a/src/test/org/apache/commons/collections/TestMultiHashMap.java
-+++ b/src/test/org/apache/commons/collections/TestMultiHashMap.java
-@@ -217,7 +217,7 @@
-         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 @@
-         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 @@
-         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 @@
-         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);
-     }
- 
---- a/src/java/org/apache/commons/collections/map/MultiKeyMap.java
-+++ b/src/java/org/apache/commons/collections/map/MultiKeyMap.java
-@@ -197,7 +197,7 @@
-      * @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];
---- a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java
-+++ b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java
-@@ -315,10 +315,10 @@
-             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/dev-java/commons-collections/metadata.xml b/dev-java/commons-collections/metadata.xml
index 3e4d58fc9fa..37998bf4074 100644
--- a/dev-java/commons-collections/metadata.xml
+++ b/dev-java/commons-collections/metadata.xml
@@ -5,7 +5,4 @@
     <email>java@gentoo.org</email>
     <name>Java</name>
   </maintainer>
-  <use>
-    <flag name="test-framework">Install the test framework</flag>
-  </use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-27  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-21  9:33 [gentoo-commits] repo/gentoo:master commit in: dev-java/commons-collections/files/, dev-java/commons-collections/ Miroslav Šulc
  -- strict thread matches above, loose matches on Subject: below --
2021-04-27  5:36 Miroslav Šulc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox