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-bsf.git
commit 8c2d0f9d6d0230797a8b6c8a8318b8763428243b Author: Gary D. Gregory <[email protected]> AuthorDate: Fri Jun 20 08:12:37 2025 -0400 Update deprecated calls in tests --- src/test/java/org/apache/bsf/util/StringUtilsTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/bsf/util/StringUtilsTest.java b/src/test/java/org/apache/bsf/util/StringUtilsTest.java index 2888e68..279dd34 100644 --- a/src/test/java/org/apache/bsf/util/StringUtilsTest.java +++ b/src/test/java/org/apache/bsf/util/StringUtilsTest.java @@ -127,7 +127,7 @@ public class StringUtilsTest extends TestCase { final PrintWriter pw = new PrintWriter(fw); pw.println("file name : Test.txt"); pw.flush(); - try (Reader reader = StringUtils.getContentAsReader(myFile.toURL())) { + try (Reader reader = StringUtils.getContentAsReader(myFile.toURI().toURL())) { final BufferedReader bf = new BufferedReader(reader); assertTrue(bf.readLine().equals("file name : Test.txt")); } @@ -144,7 +144,7 @@ public class StringUtilsTest extends TestCase { pw.println("file name : Test.txt"); pw.flush(); - result = StringUtils.getContentAsString(myFile.toURL()); + result = StringUtils.getContentAsString(myFile.toURI().toURL()); assertTrue(result.equals(("file name : Test.txt" + lineSeparator))); }
