JDK-8275319 : java.net.NetworkInterface throws java.lang.Error instead of SocketException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2021-10-15
  • Updated: 2022-01-20
  • Resolved: 2021-10-20
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.
JDK 18
18 b21Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
As noted in this PR https://github.com/openjdk/jdk/pull/5956, certain methods in NetworkInterface throw java.lang.Error (on Windows) instead of SocketException.
Comments
Changeset: 043cde22 Author: Daniel Jelinski <djelinski1@gmail.com> Committer: Daniel Fuchs <dfuchs@openjdk.org> Date: 2021-10-20 14:06:08 +0000 URL: https://git.openjdk.java.net/jdk/commit/043cde22d4d6bd975e75daa9ad52770cf79df934
20-10-2021

It would be useful to know if this is a drive-by change or whether there has been configurations/scenarios where Error is thrown. If we get "bad parameter" or other errors from the Win32 functions that suggest a JDK bug then Error or InternalError may be appropriate. So I think this one will need a detailed review.
15-10-2021