Jackie-Jiang commented on code in PR #11985: URL: https://github.com/apache/pinot/pull/11985#discussion_r1423319027
########## pinot-spi/src/main/java/org/apache/pinot/spi/env/CommonsConfigurationUtils.java: ########## @@ -47,100 +47,69 @@ public class CommonsConfigurationUtils { private CommonsConfigurationUtils() { } - public static void setListDelimiterHandler(PropertiesConfiguration configuration, Character delimiter) { - configuration.setListDelimiterHandler(new DefaultListDelimiterHandler(delimiter)); + /** + * Instantiate a {@link PropertiesConfiguration} from a {@link File}. + * @param file containing properties + * @return a {@link PropertiesConfiguration} instance. Empty if file does not exist. + */ + public static PropertiesConfiguration fromFile(File file) throws ConfigurationException { Review Comment: (minor) Please apply `Pinot Style`, same for other changes ########## pinot-spi/src/main/java/org/apache/pinot/spi/env/CommonsConfigurationUtils.java: ########## @@ -317,19 +242,57 @@ public static String recoverSpecialCharacterInPropertyValue(String value) { return value.replace("\0\0", ","); } + /** Review Comment: Sorry I still don't fully follow. Is there behavior change when calling `getList()` on comma separated list? Why do we need to explicitly split the value here? ########## pinot-spi/src/main/java/org/apache/pinot/spi/env/CommonsConfigurationUtils.java: ########## @@ -288,6 +195,7 @@ public static <T> T convert(Object value, Class<T> returnType) { * - Escaping comma with backslash doesn't work when comma is preceded by a backslash */ public static String replaceSpecialCharacterInPropertyValue(String value) { + value = StringEscapeUtils.escapeJava(value); Review Comment: Is this a bugfix? -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org