niumy0701 commented on code in PR #17718:
URL: 
https://github.com/apache/dolphinscheduler/pull/17718#discussion_r2596777957


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-dms/src/main/java/org/apache/dolphinscheduler/plugin/task/dms/DmsHook.java:
##########
@@ -268,8 +277,8 @@ public String replaceFileParameters(String parameter) 
throws IOException {
         }
         if (parameter.startsWith("file://")) {
             String filePath = parameter.substring(7);
-            try {
-                return IOUtils.toString(new FileInputStream(filePath), 
StandardCharsets.UTF_8);
+            try (FileInputStream fis = new FileInputStream(filePath)) {
+                return IOUtils.toString(fis, StandardCharsets.UTF_8);

Review Comment:
   Files.readString requires jdk11 and will not be modified for now



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to