zhyyu commented on a change in pull request #8035:
URL: https://github.com/apache/skywalking/pull/8035#discussion_r739075239



##########
File path: 
oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/config/ApplicationConfigLoader.java
##########
@@ -125,6 +126,20 @@ private void replacePropertyAndLog(final Object 
propertyName, final Object prope
         }
     }
 
+    private Object convertValueString(String valueString) {
+        try {
+            Object replaceValue = yaml.load(valueString);
+            if (replaceValue instanceof String || replaceValue instanceof 
Integer || replaceValue instanceof Long || replaceValue instanceof Boolean || 
replaceValue instanceof ArrayList) {
+                return replaceValue;
+            } else {
+                return valueString;
+            }

Review comment:
       I just worry about there are some config name or expression will be like 
`animal: pets` or some other hit yaml grammar like `e: !!str 123`, yaml will 
parse it like object or truncated string, not the origin string. So I limit the 
yaml parse Class(one of `String Integer Long Boolean ArrayList`), if yaml 
parsed Object is not one of it, the result will use origin String.




-- 
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