On 10/11/2016 16:39, Mark Sheppard wrote:

Hi,
   please oblige and review the change
http://cr.openjdk.java.net/~msheppar/8164815/webrev/src/java.base/share/classes/java/net/NetworkInterface.java.sdiff.html

to address the issue raised in
https://bugs.openjdk.java.net/browse/JDK-8164815

It was found during testing that, when a system does not have at least one configured network interface, the Enumeration is instantiated using a null value,
which results in an unexpected NPE, when it is used.

this change, adds a specific check of the return value from the getAll() native method, and throws
a SocketException should a null value have been returned.
Has there been any consideration given to returning an empty enumeration and empty stream then there are no network interfaces configured?

Also, just on terminology then I assume it would be better to use "platform" rather than "System" to keep consistency with the existing javadoc.

-Alan.

Reply via email to