You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/09/12 21:32:44 UTC
[commons-io] branch master updated (a9a47777 -> f9845671)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
from a9a47777 Fix test on Java > 8
new d89f71cc Remove cruft
new f9845671 Fix test on Java > 8
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/commons/io/function/IOIteratorAdapterTest.java | 10 ++++++++--
.../java/org/apache/commons/io/function/IOIteratorTest.java | 1 -
2 files changed, 8 insertions(+), 3 deletions(-)
[commons-io] 02/02: Fix test on Java > 8
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit f984567112e03d4b6e420597b8bbb9db2c70230c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 12 14:32:39 2022 -0700
Fix test on Java > 8
---
.../org/apache/commons/io/function/IOIteratorAdapterTest.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/io/function/IOIteratorAdapterTest.java b/src/test/java/org/apache/commons/io/function/IOIteratorAdapterTest.java
index d4fa89e3..b298d72e 100644
--- a/src/test/java/org/apache/commons/io/function/IOIteratorAdapterTest.java
+++ b/src/test/java/org/apache/commons/io/function/IOIteratorAdapterTest.java
@@ -28,6 +28,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.apache.commons.lang3.JavaVersion;
+import org.apache.commons.lang3.SystemUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -49,7 +51,6 @@ public class IOIteratorAdapterTest {
@Test
public void testAdapt() throws IOException {
- iterator = IOIteratorAdapter.adapt(newPathList().iterator());
assertEquals(TestConstants.ABS_PATH_A, iterator.next());
}
@@ -80,9 +81,14 @@ public class IOIteratorAdapterTest {
@Test
public void testRemove() throws IOException {
- assertThrows(IllegalStateException.class, iterator::remove);
+ final Class<? extends Exception> exClass = SystemUtils.isJavaVersionAtMost(JavaVersion.JAVA_1_8) ? IllegalStateException.class
+ : UnsupportedOperationException.class;
+ assertThrows(exClass, iterator::remove);
+ assertThrows(exClass, iterator::remove);
iterator.next();
assertThrows(UnsupportedOperationException.class, iterator::remove);
+ assertThrows(UnsupportedOperationException.class, iterator::remove);
+
}
}
[commons-io] 01/02: Remove cruft
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit d89f71cc85fd2aead18c55f86c747c691fcd2f97
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 12 14:31:13 2022 -0700
Remove cruft
---
src/test/java/org/apache/commons/io/function/IOIteratorTest.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/io/function/IOIteratorTest.java b/src/test/java/org/apache/commons/io/function/IOIteratorTest.java
index bfb3b40e..ca090ddc 100644
--- a/src/test/java/org/apache/commons/io/function/IOIteratorTest.java
+++ b/src/test/java/org/apache/commons/io/function/IOIteratorTest.java
@@ -52,7 +52,6 @@ public class IOIteratorTest {
@Test
public void testAdapt() throws IOException {
- iterator = IOIterator.adapt(newPathList().iterator());
assertEquals(TestConstants.ABS_PATH_A, iterator.next());
}