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 066c3acb Sort members
066c3acb is described below

commit 066c3acb4b385091436580d58fb627c4fba01bfe
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Mon Sep 12 08:12:36 2022 -0700

    Sort members
---
 .../java/org/apache/commons/io/FilenameUtilsTest.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/test/java/org/apache/commons/io/FilenameUtilsTest.java 
b/src/test/java/org/apache/commons/io/FilenameUtilsTest.java
index 1bd94c74..d6dec780 100644
--- a/src/test/java/org/apache/commons/io/FilenameUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/FilenameUtilsTest.java
@@ -932,6 +932,14 @@ public class FilenameUtilsTest {
         assertNull(FilenameUtils.normalize("\\\\..\\foo"));
     }
 
+    /**
+     */
+    @Test
+    public void testNormalize_with_null_character() {
+        assertThrows(IllegalArgumentException.class, () -> 
FilenameUtils.normalize("a\\b/c\u0000.txt"));
+        assertThrows(IllegalArgumentException.class, () -> 
FilenameUtils.normalize("\u0000a\\b/c.txt"));
+    }
+
     @Test
     public void testNormalizeFromJavaDoc() {
         // Examples from javadoc
@@ -957,14 +965,6 @@ public class FilenameUtilsTest {
         assertEquals(SEP + SEP + "foo" + SEP + "bar", 
FilenameUtils.normalize("\\\\foo\\\\.\\bar"));
     }
 
-    /**
-     */
-    @Test
-    public void testNormalize_with_null_character() {
-        assertThrows(IllegalArgumentException.class, () -> 
FilenameUtils.normalize("a\\b/c\u0000.txt"));
-        assertThrows(IllegalArgumentException.class, () -> 
FilenameUtils.normalize("\u0000a\\b/c.txt"));
-    }
-
     @Test
     public void testNormalizeNoEndSeparator() {
         assertNull(FilenameUtils.normalizeNoEndSeparator(null));

Reply via email to