royteeuwen opened a new pull request, #221:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/221

   Backport of [SLING-13260](https://issues.apache.org/jira/browse/SLING-13260) 
to the 1.x maintenance branch, tracked as 
[SLING-13277](https://issues.apache.org/jira/browse/SLING-13277).
   
   `URI.getAsciiString(...)` and `URI.getAsciiBytes(...)` passed the charset as 
a `String`, which makes `java.lang.String` perform a `Charset.forName` lookup 
that synchronizes on `sun.nio.cs.StandardCharsets`. Under load this shows up as 
threads BLOCKED in `charsetForName`. Passing `StandardCharsets.US_ASCII` 
directly skips the lookup, and lets the now-unreachable 
`UnsupportedEncodingException` handling go away.
   
   Cherry-picked from master commit `08e7786`, released in Resource Resolver 
2.0.6. It was never backported.
   
   ### Verification
   
   `mvn clean verify` on this branch: BUILD SUCCESS, 644 tests, 0 failures.
   


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