Commit 37437a0f authored by dreis2211's avatar dreis2211 Committed by Brian Clozel

Avoid allocations from lower-casing spec in JAR Handler

Closes gh-11314
parent 846e6426
......@@ -159,7 +159,7 @@ public class Handler extends URLStreamHandler {
@Override
protected void parseURL(URL context, String spec, int start, int limit) {
if (spec.toLowerCase().startsWith(JAR_PROTOCOL)) {
if (spec.regionMatches(true, 0, JAR_PROTOCOL, 0, JAR_PROTOCOL.length())) {
setFile(context, getFileFromSpec(spec.substring(start, limit)));
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment