From 8dc4c0e4146f779fd05c068974ad0b450bdc47bf Mon Sep 17 00:00:00 2001 From: Stefan Hahmann Date: Thu, 27 Jun 2024 15:33:44 +0200 Subject: [PATCH] Add assertion of 0 length File array in case of an empty String provided for String to File Array conversion --- src/test/java/org/scijava/convert/FileListConverterTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/org/scijava/convert/FileListConverterTest.java b/src/test/java/org/scijava/convert/FileListConverterTest.java index 0276fe63a..71afaa2dc 100644 --- a/src/test/java/org/scijava/convert/FileListConverterTest.java +++ b/src/test/java/org/scijava/convert/FileListConverterTest.java @@ -69,6 +69,7 @@ public void testStringToFileArrayConverter() { conv.convert(path, File[].class)[0]); assertEquals("Wrong file name", new File("C:\\temp"), conv.convert(path, File[].class)[1]); + assertEquals( 0, conv.convert( "", File[].class ).length ); } @Test