RFR: 8334297: (so) java/nio/channels/SocketChannel/OpenLeak.java should not depend on SecurityManager [v6]

Daniel Fuchs dfuchs at openjdk.org
Tue Jun 18 18:49:12 UTC 2024


On Tue, 18 Jun 2024 13:54:28 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> The test java/nio/channels/SocketChannel/OpenLeak.java depends on the SecurityManager to trigger an exception in SocketChannel::connect.
>> 
>> This change rewrites it to connect to a TCP reserved port instead, such as port 47, 51, or 61, in order to trigger a `ConnectException` instead of a `SecurityException`.
>> 
>> The original issue that this test tried to check for was:
>> https://bugs.openjdk.org/browse/JDK-6548464
>
> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review feedback: prefer not generating test case

If there are no more review comments I'll integrate tomorrow.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19723#issuecomment-2176743702


More information about the nio-dev mailing list