swaminathanmanish commented on code in PR #12393:
URL: https://github.com/apache/pinot/pull/12393#discussion_r1484927422


##########
pinot-spi/src/main/java/org/apache/pinot/spi/env/CommonsConfigurationUtils.java:
##########
@@ -241,7 +241,11 @@ public static String 
replaceSpecialCharacterInPropertyValue(String value) {
    * {@link #replaceSpecialCharacterInPropertyValue(String)}.
    */
   public static String recoverSpecialCharacterInPropertyValue(String value) {
-    value = StringEscapeUtils.unescapeJava(value);
+    try {

Review Comment:
   I saw a similar change in another method (introduced by the same PR).  I did 
not see similar issue, but wanted to just point out. 
   
   ```
    public static String replaceSpecialCharacterInPropertyValue(String value) {
       value = StringEscapeUtils.**escapeJava**(value);
   ```



##########
pinot-spi/src/main/java/org/apache/pinot/spi/env/CommonsConfigurationUtils.java:
##########
@@ -241,7 +241,11 @@ public static String 
replaceSpecialCharacterInPropertyValue(String value) {
    * {@link #replaceSpecialCharacterInPropertyValue(String)}.
    */
   public static String recoverSpecialCharacterInPropertyValue(String value) {
-    value = StringEscapeUtils.unescapeJava(value);
+    try {
+      value = StringEscapeUtils.unescapeJava(value);
+    } catch (Exception e) {
+      // If the value is not a valid escaped string, ignore the exception and 
continue

Review Comment:
   Can we log an error message/exception here ?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to