pat-lego commented on code in PR #211:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/211#discussion_r3552168528


##########
src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java:
##########
@@ -4018,11 +4019,7 @@ private static String getAsciiString(final byte[] data) {
             throw new IllegalArgumentException("Parameter may not be null");
         }
 
-        try {
-            return new String(data, "US-ASCII");
-        } catch (UnsupportedEncodingException e) {
-            throw new URIException("HttpClient requires ASCII support");
-        }
+        return new String(data, StandardCharsets.US_ASCII);

Review Comment:
   This function assumes it is Ascii (getAsciiString) it would be assumed that 
it should be otherwise why are we calling this function.



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