justinmclean opened a new issue, #8409:
URL: https://github.com/apache/gravitino/issues/8409

   ### What would you like to be improved?
   
   In clients/cli/src/main/java/org/apache/gravitino/cli/Properties.java 
correct the CLI Properties parser so that custom delimiters and key-value 
separators are treated as literal strings rather than regular expressions, 
ensuring that characters like `|` or `.` no longer break parsing.
   
   Here's a unit tests to help:
   ```
     @Test
     public void testDelimiterWithRegexSpecialChar() {
       Properties properties = new Properties("|", "=");
       String[] input = {"key1=value1|key2=value2"};
   
       Map<String, String> result = properties.parse(input);
   
       assertEquals(2, result.size());
       assertEquals("value1", result.get("key1"));
       assertEquals("value2", result.get("key2"));
     }
   
     @Test
     public void testSeparatorWithRegexSpecialChar() {
       Properties properties = new Properties(",", "|");
       String[] input = {"key1|value1,key2|value2"};
   
       Map<String, String> result = properties.parse(input);
   
       assertEquals(2, result.size());
       assertEquals("value1", result.get("key1"));
       assertEquals("value2", result.get("key2"));
     }
   ```
   
   ### How should we improve?
   
   _No response_


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