mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8248703: Clarify the behavior of java.net.NetworkInterface::equals
The API documentation of NetworkInterface::equals is clarified to warn about the possibility that two NetworkInterface representing the same underlying interface objects might not compare equal if the IP addresses bound to the interfaces are being dynamically updated by the system. Reviewed-by: alanb, chegar
This commit is contained in:
parent
734a6c94d3
commit
82cc03fa89
1 changed files with 7 additions and 1 deletions
|
@ -576,7 +576,13 @@ public final class NetworkInterface {
|
|||
* as this object.
|
||||
* <p>
|
||||
* Two instances of {@code NetworkInterface} represent the same
|
||||
* NetworkInterface if both name and addrs are the same for both.
|
||||
* NetworkInterface if both the name and the set of {@code InetAddress}es
|
||||
* bound to the interfaces are equal.
|
||||
*
|
||||
* @apiNote two {@code NetworkInterface} objects referring to the same
|
||||
* underlying interface may not compare equal if the addresses
|
||||
* of the underlying interface are being dynamically updated by
|
||||
* the system.
|
||||
*
|
||||
* @param obj the object to compare against.
|
||||
* @return {@code true} if the objects are the same;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue