On Wed, 22 Oct 2025 12:30:59 GMT, Daniel Fuchs <[email protected]> wrote:
>> Volkan Yazici has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Move `preTerminationCallback` to `complete()`
>
> src/java.net.http/share/classes/jdk/internal/net/http/common/HttpBodySubscriberWrapper.java
> line 412:
>
>> 410: if (preTerminationCallback != null) {
>> 411: preTerminationCallback.run();
>> 412: }
>
> Did you consider adding this to complete() instead? There would then be a
> single place where this code would appear.
This not just simplifies the code, but also corrects it!
`preTerminationCallback` should be called once. Implemented as suggested in
bcd5bcc8a58.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27469#discussion_r2460440877