Integrated: 8334297: (so) java/nio/channels/SocketChannel/OpenLeak.java should not depend on SecurityManager

Daniel Fuchs dfuchs at openjdk.org
Wed Jun 19 10:57:14 UTC 2024


On Fri, 14 Jun 2024 14:21:40 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

This pull request has now been integrated.

Changeset: 50bed6c6
Author:    Daniel Fuchs <dfuchs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/50bed6c67b1edd7736bdf79308d135a4e1047ff0
Stats:     93 lines in 1 file changed: 82 ins; 0 del; 11 mod

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

Reviewed-by: alanb

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

PR: https://git.openjdk.org/jdk/pull/19723


More information about the nio-dev mailing list