RFR: 8294378: URLPermission constructor exception when using tr locale
Jaikiran Pai
jpai at openjdk.org
Tue Nov 8 09:47:03 UTC 2022
On Fri, 28 Oct 2022 13:48:04 GMT, Ryan Wallace <duke at openjdk.org> wrote:
> Hi all,
>
> Please review this fix for Invalid characters in hostname exception.
> This was due to the URLPermission.parseURI() method calling String.toLowerCase() and returning a non ASCII characters in the case of the tr Locale. The fix was to use the HostPortrange.toLowerCase() method further down the stack which is Locale safe.
>
> Thanks,
> Ryan.
I suspect it might be better to introduce that new test `@run` with Turkish locale in the existing `URLPermissionTest` itself - passing it that specific URL to test. That way you won't have to refactor that existing test to extend from a new utility class.
test/jdk/java/net/URLPermission/URLPermissionNonASCIITest.java line 2:
> 1: /*
> 2: * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
Hello Ryan, there's a comma missing here after `2022`.
-------------
PR: https://git.openjdk.org/jdk/pull/10903
More information about the net-dev
mailing list