JDK-6456276 : VISTA: api/java_net/NetworkInterface/index.html#static fails.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 5.0u8
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: generic
  • Submitted: 2006-08-02
  • Updated: 2014-02-27
  • Resolved: 2006-10-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_18-revResolved
Related Reports
Relates :  
Description
The following jck test fails on vista with tiger (passes with mustang):

  api/java_net/NetworkInterface/index.html#static

  NetworkInterface2001: Failed. public static NetworkInterface
  getByInetAddress(InetAddress addr) throws SocketException Test Failed
  NetworkInterface2002: Passed. OKAY
  STATUS:Failed.test cases: 2; passed: 1; failed: 1; first test case failure:  
  NetworkInterface2001

  >>> irevista/129.156.232.46
  >>> irevista/fe80:0:0:0:90bf:ee1e:be3b:f8a8
  Returned NetworkInterface for address irevista/fe80:0:0:0:90bf:ee1e:be3b:f8a8 is null

Comments
EVALUATION Do not use scopeid in NetworkInterface implementaion when determining equality.
13-10-2006

EVALUATION The problem is that Inet6Address objects returned from InetAddress.getByName and getAllByName do not have their scopeid set. NetworkInterface.getByInetAddress uses the scopeid as well as the address to determine if the InetAddress being passed in is equals the address on one of the systems interfaces. As the scopeid is not being set in these objects being passed to NetworkInterface.getByInetAddress, a matching interface is never found. To fix this we simply remove the equality on scopeids from NetworkInterface.getByInetAddress. NOTE: THIS DOES NOT OCCUR WITH MUSTANG. In mustang InetAddress.get(All)ByName retruns Inet6Addresses that have their scopeid values set where applicable.
02-08-2006