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:10:22 UTC

[commons-io] branch master updated (e138ea9e -> a9a47777)

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 e138ea9e Add IOIterator
     new cf6beed9 Make package-private class final
     new e1a042d5 Add Javadoc since tag
     new 81e7e01c Make package-private class final
     new a9a47777 Fix test on Java > 8

The 4 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:
 src/main/java/org/apache/commons/io/function/Constants.java      | 2 +-
 src/main/java/org/apache/commons/io/function/Erase.java          | 2 +-
 src/main/java/org/apache/commons/io/function/IOIterator.java     | 1 +
 src/test/java/org/apache/commons/io/function/IOIteratorTest.java | 8 ++++++--
 4 files changed, 9 insertions(+), 4 deletions(-)


[commons-io] 01/04: Make package-private class final

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 cf6beed92a6680eecffecb7ab40b18fa7cc55a81
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 12 14:05:05 2022 -0700

    Make package-private class final
---
 src/main/java/org/apache/commons/io/function/Constants.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/function/Constants.java b/src/main/java/org/apache/commons/io/function/Constants.java
index a094710e..6ad3a63c 100644
--- a/src/main/java/org/apache/commons/io/function/Constants.java
+++ b/src/main/java/org/apache/commons/io/function/Constants.java
@@ -20,7 +20,7 @@ package org.apache.commons.io.function;
 /**
  * Defines package-private constants.
  */
-class Constants {
+final class Constants {
 
     /**
      * No-op singleton.


[commons-io] 02/04: Add Javadoc since tag

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 e1a042d561fe3562072ad9d6d0bcad3a1e1d260c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 12 14:05:22 2022 -0700

    Add Javadoc since tag
---
 src/main/java/org/apache/commons/io/function/IOIterator.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/commons/io/function/IOIterator.java b/src/main/java/org/apache/commons/io/function/IOIterator.java
index 572a33d3..dd64d232 100644
--- a/src/main/java/org/apache/commons/io/function/IOIterator.java
+++ b/src/main/java/org/apache/commons/io/function/IOIterator.java
@@ -28,6 +28,7 @@ import java.util.function.Consumer;
  * Like {@link Iterator} but throws {@link IOException}.
  *
  * @param <E> the type of elements returned by this iterator.
+ * @since 2.12.0
  */
 public interface IOIterator<E> {
 


[commons-io] 04/04: 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 a9a477779c9fa2caad2034dbd8a02048a38bafaa
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 12 14:10:17 2022 -0700

    Fix test on Java > 8
---
 src/test/java/org/apache/commons/io/function/IOIteratorTest.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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 47101ca3..bfb3b40e 100644
--- a/src/test/java/org/apache/commons/io/function/IOIteratorTest.java
+++ b/src/test/java/org/apache/commons/io/function/IOIteratorTest.java
@@ -29,6 +29,8 @@ import java.util.Arrays;
 import java.util.Iterator;
 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;
 
@@ -84,8 +86,10 @@ public class IOIteratorTest {
 
     @Test
     public void testRemove() throws IOException {
-        assertThrows(IllegalStateException.class, iterator::remove);
-        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] 03/04: Make package-private class final

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 81e7e01c5be43e6cae064d7b8098989e5b3db1f3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 12 14:05:41 2022 -0700

    Make package-private class final
---
 src/main/java/org/apache/commons/io/function/Erase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/function/Erase.java b/src/main/java/org/apache/commons/io/function/Erase.java
index 3447b883..9c883bfb 100644
--- a/src/main/java/org/apache/commons/io/function/Erase.java
+++ b/src/main/java/org/apache/commons/io/function/Erase.java
@@ -21,7 +21,7 @@ import java.io.IOException;
 /**
  * Erases {@link IOException} for the compiler but still throws that exception at runtime.
  */
-class Erase {
+final class Erase {
 
     /**
      * Delegates to the given {@link IOBiConsumer} but erases its {@link IOException} for the compiler, while still throwing