summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/commons-collections/commons-collections-3.2.1-r3.ebuild11
-rw-r--r--dev-java/commons-collections/files/commons-collections-3.2.1-fix-tests.patch13
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