tabish121 commented on code in PR #5452:
URL: https://github.com/apache/activemq-artemis/pull/5452#discussion_r1925857044


##########
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java:
##########
@@ -140,12 +141,24 @@ public static boolean containsQuery(SimpleString uri) {
       return uri.contains('?');
    }
 
-   private static void parseParameters(Map<String, String> rc, String[] 
parameters) {
+   protected static void parseParameters(Map<String, String> rc, String[] 
parameters) {
       for (String parameter : parameters) {
          int p = parameter.indexOf("=");
          if (p >= 0) {
-            String name = URLDecoder.decode(parameter.substring(0, p), 
StandardCharsets.UTF_8);
-            String value = URLDecoder.decode(parameter.substring(p + 1), 
StandardCharsets.UTF_8);
+            String name;
+            String value;
+            try {
+               name = URLDecoder.decode(parameter.substring(0, p), 
StandardCharsets.UTF_8);
+            } catch (IllegalArgumentException e) {
+               
ActiveMQUtilLogger.LOGGER.unableToParseURLParameterName(parameter.substring(0, 
p), e);
+               continue;

Review Comment:
   This looks good to me.  I had similar thoughts on the original changes as 
Robbie did, I would generally expect things to fail than to suppress errors and 
lead people to think configuration was applied when it was not.  



-- 
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: gitbox-unsubscr...@activemq.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to