Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL
Alan.Bateman at oracle.com
Wed Jan 20 12:02:29 UTC 2021
On 20/01/2021 11:57, Claes Redestad wrote:
> looks reasonable. I'll file an RFE.
> - canonize -> canonicalize seem like an appropriate change of terms :-)
> - the bangSlash parameter could perhaps be better named from, since
> bangSlash is not a concept known to ParseUtil. Or move the util
> methods to the Handler, since it's the only caller anyway
> - calling file.length() twice: maybe let len = file.length() and
> replace len == 0 with from >= len?
I suspect some refactoring is needed as some of this code in ParseUtil
is not general purpose and should probably move to the jar URL handler.
A discussion for net-dev when there is a patch to discuss.
More information about the core-libs-dev