sebbASF commented on code in PR #383:
URL: https://github.com/apache/commons-validator/pull/383#discussion_r3379991675
##########
src/main/java/org/apache/commons/validator/routines/UrlValidator.java:
##########
@@ -476,6 +479,14 @@ protected boolean isValidFragment(final String fragment) {
return isOff(NO_FRAGMENTS);
}
+ private String decodePath(final String path) {
+ try {
+ return URLDecoder.decode(path, StandardCharsets.UTF_8.name());
+ } catch (final UnsupportedEncodingException e) {
+ throw new RuntimeException(e); // UTF-8 is always supported
Review Comment:
Given that the exception is immediately caught by the caller, there is no
need to rethrow.
--
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]