You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2023/01/20 04:30:15 UTC

[GitHub] [dolphinscheduler] github-code-scanning[bot] commented on a diff in pull request #13436: Split the upgrade code

github-code-scanning[bot] commented on code in PR #13436:
URL: https://github.com/apache/dolphinscheduler/pull/13436#discussion_r1082100155


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ScriptRunner.java:
##########
@@ -91,17 +93,17 @@
      * @throws IOException if there is an error reading from the Reader
      */
     private void runScript(Connection conn, Reader reader) throws IOException, SQLException {
-        StringBuffer command = null;
+        List<String> command = null;
         try {
             LineNumberReader lineReader = new LineNumberReader(reader);
             String line;
             while ((line = lineReader.readLine()) != null) {
                 if (command == null) {
-                    command = new StringBuffer();
+                    command = new ArrayList<>();
                 }
                 String trimmedLine = line.trim();
                 if (trimmedLine.startsWith("--")) {
-                    logger.info(trimmedLine);
+                    logger.info("\n", trimmedLine);

Review Comment:
   ## Unused format argument
   
   This format call refers to 0 argument(s) but supplies 1 argument(s).
   
   [Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/2591)



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org