RFR: JDK-8164815 - 3 JCK NetworkInterface tests fail on Raspberry Pi
Chris Hegarty
chris.hegarty at oracle.com
Thu Nov 10 19:26:11 UTC 2016
On 10 Nov 2016, at 16:48, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 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?
It has, but, for me at least, since the changes for 7120665 [1] require a
conformant implementation to support at least one network interface, it
seems more like an error if we encounter this situation.
> Also, just on terminology then I assume it would be better to use "platform" rather than "System" to keep consistency with the existing javadoc.
Agreed.
-Chris.
[1] https://bugs.openjdk.java.net/browse/JDK-7120665
More information about the net-dev
mailing list