On Wed, 1 Apr 2026 15:20:09 GMT, Daniel Fuchs <[email protected]> wrote:

>> Daniel Jeliński has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Add a comment to the assertion
>>  - Add try-finally
>
> src/java.net.http/share/classes/jdk/internal/net/http/quic/PeerConnIdManager.java
>  line 288:
> 
>> 286:         lock.lock();
>> 287:         try {
>> 288:             assert closed;
> 
> Looking at the code it seems OK to assert this, but it would be good to have 
> a comment explaining when this method is called to explain the assert. And 
> possibly add some statement to method API doc stating that it should not be 
> called before the connection manager is closed.
> 
> I mean - someone could legitimately want to call this method to log the 
> stateless reset tokens at any point in time, even if the connection manager 
> is not closed. We don't do that - we call this method only after having 
> closed the connection manager, and the assert here validate that assumptions.

Thanks @dfuch for the review.

I added a comment to the assert, let me know if that's good enough.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30534#discussion_r3026779915

Reply via email to