-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b07
As suggested by Eirik Bjørsnøs at https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-January/073277.html:
sun.net.www.protocol.jar.Handler.parseURL unconditionally calls
String.substring twice on the spec string, even when ParseUtil.canonizeString later determines that no canonization was required.
By letting canonizeString do the substring calls, but only when it
determines that it is needed, we can remove some unnecessary String and byte[] allocations.
sun.net.www.protocol.jar.Handler.parseURL unconditionally calls
String.substring twice on the spec string, even when ParseUtil.canonizeString later determines that no canonization was required.
By letting canonizeString do the substring calls, but only when it
determines that it is needed, we can remove some unnecessary String and byte[] allocations.