提交 ae59f507 编写于 作者: C chegar

6706251: api/java_net/NetworkInterface/index.html#misc: getDisplayName()...

6706251: api/java_net/NetworkInterface/index.html#misc: getDisplayName() returned non null but empty String
Reviewed-by: alanb, michaelm, andrew
上级 e14d4e1b
......@@ -221,11 +221,12 @@ public final class NetworkInterface {
* A display name is a human readable String describing the network
* device.
*
* @return the display name of this network interface,
* or null if no display name is available.
* @return a non-empty string representing the display name of this network
* interface, or null if no display name is available.
*/
public String getDisplayName() {
return displayName;
/* strict TCK conformance */
return "".equals(displayName) ? null : displayName;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册