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 2021/05/28 16:12:09 UTC

[commons-io] branch master updated: Simplify.

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


The following commit(s) were added to refs/heads/master by this push:
     new c08b587  Simplify.
c08b587 is described below

commit c08b58707c8969266c833eac1233ff585334d2ca
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri May 28 12:12:06 2021 -0400

    Simplify.
---
 src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java
index 9906432..327122e 100644
--- a/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java
@@ -91,11 +91,7 @@ public class RegexFileFilter extends AbstractFileFilter implements Serializable
      * @return Pattern compilation flags.
      */
     private static int toFlags(final IOCase caseSensitivity) {
-        int flags = 0;
-        if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {
-            flags = Pattern.CASE_INSENSITIVE;
-        }
-        return flags;
+        return caseSensitivity != null && !caseSensitivity.isCaseSensitive() ? Pattern.CASE_INSENSITIVE : 0;
     }
 
     /** The regular expression pattern that will be used to match file names. */