HeartSaVioR commented on a change in pull request #2950: STORM-3327: Use UTF-8 
for URL encoding in storm-webapp
URL: https://github.com/apache/storm/pull/2950#discussion_r254291713
 
 

 ##########
 File path: storm-client/src/jvm/org/apache/storm/utils/Utils.java
 ##########
 @@ -246,7 +248,11 @@ replace below code with split(",") once 'storm.cmd' is 
fixed to send url-encoded
               */
             String[] configs = commandOptions.split(",(?![^\\[\\]{}]*(]|}))");
             for (String config : configs) {
-                config = URLDecoder.decode(config);
+                try {
+                    config = URLDecoder.decode(config, 
StandardCharsets.UTF_8.name());
 
 Review comment:
   Could we add this to util class so that we don't need to specify 
`StandardCharsets.UTF_8.name()` all the time? Maybe two versions throwing 
original UnsupportedEncodingException and RuntimeException wrapping 
UnsupportedEncodingException.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to