From 872ce74ccdbd32ca91410110944b940bbf85f50a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 11:22:09 +0000 Subject: [PATCH] chore(internal): codegen related update --- .../core/http/PhantomReachableClosingHttpClient.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/http/PhantomReachableClosingHttpClient.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/http/PhantomReachableClosingHttpClient.kt index f923a21..756f8a2 100644 --- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/http/PhantomReachableClosingHttpClient.kt +++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/http/PhantomReachableClosingHttpClient.kt @@ -4,6 +4,11 @@ import java.util.concurrent.CompletableFuture import org.onebusaway.core.RequestOptions import org.onebusaway.core.closeWhenPhantomReachable +/** + * A delegating wrapper around an `HttpClient` that closes it once it's only phantom reachable. + * + * This class ensures the `HttpClient` is closed even if the user forgets to close it. + */ internal class PhantomReachableClosingHttpClient(private val httpClient: HttpClient) : HttpClient { init { closeWhenPhantomReachable(this, httpClient)