Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/commons-collections/files/, dev-java/commons-collections/
Date: Wed, 21 Apr 2021 09:33:23
Message-Id: 1618997589.510bcd96906092e82a7549d8fcb0477494d7b02b.fordfrog@gentoo
1 commit: 510bcd96906092e82a7549d8fcb0477494d7b02b
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 21 08:48:14 2021 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 21 09:33:09 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=510bcd96
7
8 dev-java/commons-collections: fixed compilation of tests in 3.2.1-r3
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 .../commons-collections/commons-collections-3.2.1-r3.ebuild | 11 +++++++----
14 .../files/commons-collections-3.2.1-fix-tests.patch | 13 +++++++++++++
15 2 files changed, 20 insertions(+), 4 deletions(-)
16
17 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
18 index cfd46905336..75a4556fc9c 100644
19 --- a/dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild
20 +++ b/dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild
21 @@ -19,17 +19,20 @@ IUSE="test"
22 RESTRICT="!test? ( test )"
23
24 DEPEND="
25 - >=virtual/jdk-1.8
26 + >=virtual/jdk-1.8:*
27 test? (
28 dev-java/junit:0
29 dev-java/ant-junit:0
30 )"
31
32 -RDEPEND=">=virtual/jre-1.8"
33 +RDEPEND=">=virtual/jre-1.8:*"
34
35 S="${WORKDIR}/${P}-src"
36
37 -PATCHES=( "${FILESDIR}/${P}-Java-8.patch" )
38 +PATCHES=(
39 + "${FILESDIR}/${P}-Java-8.patch"
40 + "${FILESDIR}/${P}-fix-tests.patch"
41 +)
42
43 src_prepare() {
44 default
45 @@ -38,7 +41,7 @@ src_prepare() {
46 src_compile() {
47 local antflags
48 if use test; then
49 - antflags="tf.jar -Djunit.jar=$(java-pkg_getjars junit)"
50 + antflags="tf.jar -Djunit.jar=$(java-pkg_getjars --build-only junit)"
51 fi
52 eant jar $(use_doc) ${antflags}
53 }
54
55 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
56 new file mode 100644
57 index 00000000000..9ba66eb6e4a
58 --- /dev/null
59 +++ b/dev-java/commons-collections/files/commons-collections-3.2.1-fix-tests.patch
60 @@ -0,0 +1,13 @@
61 +diff --git a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
62 +index 1c01b53..aea6edf 100644
63 +--- a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
64 ++++ b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
65 +@@ -1116,7 +1116,7 @@ public abstract class AbstractTestCollection extends AbstractTestObject {
66 + verify();
67 +
68 + try {
69 +- array = collection.toArray(null);
70 ++ array = collection.toArray((Object[]) null);
71 + fail("toArray(null) should raise NPE");
72 + } catch (NullPointerException e) {
73 + // expected