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 2024/04/03 14:43:01 UTC

(commons-io) 02/04: Use this in ctor

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 2558a64939d4786025a23dda34fff4634fe05e57
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Apr 3 10:40:26 2024 -0400

    Use this in ctor
    
    - Javadoc
    - Longer line
---
 .../java/org/apache/commons/io/input/CharacterSetFilterReader.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java b/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java
index 7a2f82a3e..a5cb4f85f 100644
--- a/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java
+++ b/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java
@@ -37,7 +37,8 @@ public class CharacterSetFilterReader extends AbstractCharacterFilterReader {
         if (skip == null) {
             return SKIP_NONE;
         }
-        return c -> Collections.unmodifiableSet(skip).contains(Integer.valueOf(c));
+        final Set<Integer> unmodifiableSet = Collections.unmodifiableSet(skip);
+        return c -> unmodifiableSet.contains(Integer.valueOf(c));
     }
 
     /**