JDK-8233860 : java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-11-08
  • Updated: 2021-07-17
  • Resolved: 2019-11-14
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 14
14 b24Fixed
Related Reports
Blocks :  
Relates :  
Description
The test tries to pass a boolean value for the IP_MULTICAST_IF option and expects to get SocketException("Socket is closed"); 
An implementation should be in its own right to throw an IllegalArgumentException instead (and DatagramChannel;;socket()) actually does.
The test should be fixed to either pass a NetworkInterface or accept IllegalArgumentException as a valid outcome.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/625262261ef2 User: dfuchs Date: 2019-11-14 19:00:05 +0000
14-11-2019

When I added this test I mistakenly used "bad" input values, which went unnoticed since the particular implementation under test did not eagerly check them. I agree that the test should be updated to be passed valid input.
11-11-2019

I've attached the patch that I have been using locally to workaround this test bug.
08-11-2019