RFR: 8294626: Improve URL protocol lower casing

Alan Bateman alanb at openjdk.org
Fri Sep 30 12:17:22 UTC 2022


On Fri, 30 Sep 2022 11:06:40 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> `URLUtil` already exists, is used during bootstrap from non-java.net packages and would profit from reusing this lower case method. Making the method in `URL` public is a non-starter. I'd love having module-scoped visibility modifier (so we could share static utility methods without resorting to non-exported utility classes), but without that this was the best option to get the full benefit without duplicating the logic in places like `URLUtil.urlNoFragString`

The update looks okay, I see Daniel has approved. Although special casing in a lower casing method is okay I think the main thing we have to avoid is doing special casing for built-in protocol handlers in several places, only because there are so many issues that can arise if we change it in one place and not another. There are also changes in the works that need to do more validation with the built-in protocol handlers.

-------------

PR: https://git.openjdk.org/jdk/pull/10506


More information about the net-dev mailing list