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


##########
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:
   what happens if the byte array does not map to ASCII?



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