On Thu, 28 Nov 2024 15:50:47 GMT, Volkan Yazıcı <d...@openjdk.org> wrote:

>> test/jdk/java/net/Socket/ConnectFailTest.java line 144:
>> 
>>> 142:     }
>>> 143: 
>>> 144:     @SuppressWarnings("resource")
>> 
>> What is this SuppressWarnings for?
>
> For IntelliJ's `'SocketChannel' used without 'try'-with-resources statement` 
> warning on `open()` method. Am I supposed to not suppress IDE warnings?

Oh - OK - I see. That's fine. We usually don't suppress warnings in tests. 
Maybe we should. On the other hand `@SuppressWarnings` is a two edged sword as 
it can hide other issues if its scope is too large.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22160#discussion_r1862463926

Reply via email to