Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
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
  • Loading branch information
dfuch committed Jul 3, 2020
1 parent 734a6c9 commit 82cc03fa8954bd48f03a3826c97755f78051420d
Showing 1 changed file with 7 additions and 1 deletion.
@@ -576,7 +576,13 @@ public boolean isVirtual() {
* 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;

0 comments on commit 82cc03f

Please sign in to comment.