diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6a37fe2d..51b15c88 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.0.1" + ".": "4.0.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index eb3e14e7..04de6b78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 4.0.2 (2025-02-12) + +Full Changelog: [v4.0.1...v4.0.2](https://github.com/Finch-API/finch-api-java/compare/v4.0.1...v4.0.2) + +### Chores + +* **internal:** refactor `PhantomReachableClosingAsyncStreamResponse` impl ([#434](https://github.com/Finch-API/finch-api-java/issues/434)) ([e4c0a86](https://github.com/Finch-API/finch-api-java/commit/e4c0a86b8a1dfb914b40edd43dfb5f199f76231d)) + + +### Documentation + +* add more phantom reachability docs ([e4c0a86](https://github.com/Finch-API/finch-api-java/commit/e4c0a86b8a1dfb914b40edd43dfb5f199f76231d)) + ## 4.0.1 (2025-02-11) Full Changelog: [v4.0.0...v4.0.1](https://github.com/Finch-API/finch-api-java/compare/v4.0.0...v4.0.1) diff --git a/README.md b/README.md index 9baf7ea6..12b43fd0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/4.0.1) +[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/4.0.2) @@ -23,7 +23,7 @@ The REST API documentation can be foundĀ [in the Finch Documentation Center](htt ### Gradle ```kotlin -implementation("com.tryfinch.api:finch-java:4.0.1") +implementation("com.tryfinch.api:finch-java:4.0.2") ``` ### Maven @@ -32,7 +32,7 @@ implementation("com.tryfinch.api:finch-java:4.0.1") com.tryfinch.api finch-java - 4.0.1 + 4.0.2 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 602a6b8d..12e8bf5d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,4 @@ allprojects { group = "com.tryfinch.api" - version = "4.0.1" // x-release-please-version + version = "4.0.2" // x-release-please-version } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/PhantomReachableClosingHttpClient.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/PhantomReachableClosingHttpClient.kt index e6931bca..82a11397 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/PhantomReachableClosingHttpClient.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/PhantomReachableClosingHttpClient.kt @@ -4,6 +4,11 @@ import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.closeWhenPhantomReachable import java.util.concurrent.CompletableFuture +/** + * 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)