On Tue, 3 Dec 2024 15:52:31 GMT, Aleksei Efimov <aefi...@openjdk.org> wrote:
> The proposed change fixes `InetAddress.ofLiteral` and > `Inet6Address.ofLiteral` to throw `IllegalArgumentException` instead of > `StringIndexOutOfBoundsException` when an empty IP addres literal string is > specified. > The `Inet4Address.ofLiteral` correctly throws `IllegalArgumentException` when > a literal cannot be parsed as an IPv4 address literal. It was addressed > before in [JDK-8315767](https://bugs.openjdk.org/browse/JDK-8315767) fix. > > Testing: the modified `OfLiteralTest` test and other tests from `jdk-tier1` > to `jdk-tier3` tiers This pull request has now been integrated. Changeset: 0c7451ae Author: Aleksei Efimov <aefi...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/0c7451ae5abb90e59293cdcb5f2318e3bc5193a2 Stats: 21 lines in 3 files changed: 18 ins; 0 del; 3 mod 8332686: InetAddress.ofLiteral can throw StringIndexOutOfBoundsException Reviewed-by: dfuchs, jpai ------------- PR: https://git.openjdk.org/jdk/pull/22518