Skip to content

Commit

Permalink
Two more patches for newer Collections versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjust committed Sep 9, 2024
1 parent 7ce21c0 commit 7c1305e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions framework/projects/Collections/compile-errors/compile-26-27.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/src/test/java/org/apache/commons/collections4/FluentIterableTest.java b/src/test/java/org/apache/commons/collections4/FluentIterableTest.java
index 5042dd2b..b35ec769 100644
--- a/src/test/java/org/apache/commons/collections4/FluentIterableTest.java
+++ b/src/test/java/org/apache/commons/collections4/FluentIterableTest.java
@@ -239,7 +239,7 @@ public class FluentIterableTest {
assertEquals(expectedSum, sum.get());

try {
- FluentIterable.of(iterableA).forEach(null);
+ FluentIterable.of(iterableA).forEach((Closure<Integer>)null);
fail("expecting NullPointerException");
} catch (NullPointerException npe) {
// expected
diff --git a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
index ab1e1033..3d72ef79 100644
--- a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
@@ -1085,7 +1085,7 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
verify();

try {
- array = getCollection().toArray(null);
+ array = getCollection().toArray((Object[])null);
fail("toArray(null) should raise NPE");
} catch (final NullPointerException e) {
// expected
13 changes: 13 additions & 0 deletions framework/projects/Collections/compile-errors/compile-28-28.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
index ab1e1033..3d72ef79 100644
--- a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
@@ -1085,7 +1085,7 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
verify();

try {
- array = getCollection().toArray(null);
+ array = getCollection().toArray((Object[])null);
fail("toArray(null) should raise NPE");
} catch (final NullPointerException e) {
// expected

0 comments on commit 7c1305e

Please sign in to comment.