You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/05/06 12:12:27 UTC

[GitHub] [incubator-inlong] haifxu opened a new pull request, #4096: [INLONG-4095][Manager] Fix UT error and align special characters

haifxu opened a new pull request, #4096:
URL: https://github.com/apache/incubator-inlong/pull/4096

   ### Title Name: [INLONG-XYZ][component] Fix UT error and align special characters
   
   Fixes #4095 
   
   ### Modifications
   
   1、Modify the configuration file acquisition method
   
   2、Add judgment to special characters
   
   ### Verifying this change
   
   ![image](https://user-images.githubusercontent.com/58519431/167128961-18beb044-78ab-4820-9879-c6f1c5b8ee08.png)
   
   


-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] healchow merged pull request #4096: [INLONG-4095][Manager] Fix UT error and align special characters

Posted by GitBox <gi...@apache.org>.
healchow merged PR #4096:
URL: https://github.com/apache/incubator-inlong/pull/4096


-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] healchow commented on a diff in pull request #4096: [INLONG-4095][Manager] Fix UT error and align special characters

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4096:
URL: https://github.com/apache/incubator-inlong/pull/4096#discussion_r866902781


##########
inlong-manager/manager-client-tools/src/main/java/org/apache/inlong/manager/client/cli/util/PrintUtil.java:
##########
@@ -17,13 +17,14 @@
 
 package org.apache.inlong.manager.client.cli.util;
 
+import com.alibaba.fastjson.JSONObject;

Review Comment:
   Please replace the `fastjson` with the `gson`.



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] healchow commented on a diff in pull request #4096: [INLONG-4095][Manager] Fix UT error and align special characters

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4096:
URL: https://github.com/apache/incubator-inlong/pull/4096#discussion_r866900524


##########
inlong-manager/manager-client-tools/src/main/java/org/apache/inlong/manager/client/cli/CommandUtil.java:
##########
@@ -25,22 +25,24 @@
 
 import java.io.BufferedInputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Properties;
 
 abstract class CommandUtil {
 
     public InlongClientImpl connect() {
         Properties properties = new Properties();
-        String path = System.getProperty("user.dir") + "/conf/application.properties";
+        String path =
+                Thread.currentThread().getContextClassLoader().getResource("").getPath() + "application.properties";

Review Comment:
   Could you please set the `application.properties` as a constant?



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] healchow commented on a diff in pull request #4096: [INLONG-4095][Manager] Fix UT error and align special characters

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4096:
URL: https://github.com/apache/incubator-inlong/pull/4096#discussion_r866904366


##########
inlong-manager/manager-client-tools/src/main/java/org/apache/inlong/manager/client/cli/util/PrintUtil.java:
##########
@@ -113,12 +116,14 @@ private static <K> int[] getColumnWidth(List<K> list) {
                 for (int j = 0; j < fields.length; j++) {
                     fields[j].setAccessible(true);
                     if (fields[j].get(k) != null) {
-                        int length = fields[j].get(k).toString().length();
+                        int length = fields[j].get(k).toString().getBytes("GBK").length;

Review Comment:
   For the Chinese string encoded by UTF-8, will GBK be used to parse it?



-- 
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@inlong.apache.org

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