diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2021-04-21 10:48:14 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2021-04-21 11:33:09 +0200 |
commit | 510bcd96906092e82a7549d8fcb0477494d7b02b (patch) | |
tree | e7d39da2a98511848e17e3a2e1f6f98b34b2eb22 /dev-java/commons-collections | |
parent | app-emulation/virtualbox*: Removed old (diff) | |
download | gentoo-510bcd96906092e82a7549d8fcb0477494d7b02b.tar.gz gentoo-510bcd96906092e82a7549d8fcb0477494d7b02b.tar.bz2 gentoo-510bcd96906092e82a7549d8fcb0477494d7b02b.zip |
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@gentoo.org>
Diffstat (limited to 'dev-java/commons-collections')
-rw-r--r-- | dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild | 11 | ||||
-rw-r--r-- | dev-java/commons-collections/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 cfd46905336a..75a4556fc9c6 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 000000000000..9ba66eb6e4a2 --- /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
|