mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8277608: Address IP Addressing
Reviewed-by: dfuchs, rhalade, michaelm
This commit is contained in:
parent
ec1d338e15
commit
cdc1582d1d
4 changed files with 288 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -137,7 +137,7 @@ class HostPortrange {
|
|||
}
|
||||
this.ipv4 = this.literal = ipv4;
|
||||
if (ipv4) {
|
||||
byte[] ip = IPAddressUtil.textToNumericFormatV4(hoststr);
|
||||
byte[] ip = IPAddressUtil.validateNumericFormatV4(hoststr);
|
||||
if (ip == null) {
|
||||
throw new IllegalArgumentException("illegal IPv4 address");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue