Rename builder methods from setFoo() to foo(). As of Java 17, the getFoo()/setFoo(value) naming convention has been effectively replaced with foo()/foo(value). Especially for a pre-1.0 project, it makes sense to align with this development.
Do not rename addFoo() builder methods to distinguish them from setters.
Change HttpClientInitException to extend RuntimeException instead of PklException. Except for PklBugException, no other exception class extends PklException.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/329
**Author:** [@odenix](https://github.com/odenix)
**Created:** 3/17/2024
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `polish-http`
---
### 📝 Commits (1)
- [`6440fa3`](https://github.com/apple/pkl/commit/6440fa3a4121d9c2705183c7cdea208226536831) Polish HttpClient API
### 📊 Changes
**10 files changed** (+21 additions, -24 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliBaseOptions.kt` (+1 -1)
📝 `pkl-core/src/main/java/org/pkl/core/http/HttpClient.java` (+7 -8)
📝 `pkl-core/src/main/java/org/pkl/core/http/HttpClientBuilder.java` (+4 -4)
📝 `pkl-core/src/main/java/org/pkl/core/http/HttpClientInitException.java` (+1 -3)
📝 `pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java` (+1 -1)
📝 `pkl-core/src/test/kotlin/org/pkl/core/StackFrameTransformersTest.kt` (+1 -1)
📝 `pkl-core/src/test/kotlin/org/pkl/core/http/HttpClientTest.kt` (+3 -3)
📝 `pkl-core/src/test/kotlin/org/pkl/core/packages/PackageResolversTest.kt` (+1 -1)
📝 `pkl-core/src/test/kotlin/org/pkl/core/project/ProjectDependenciesResolverTest.kt` (+1 -1)
📝 `pkl-core/src/test/kotlin/org/pkl/core/project/ProjectTest.kt` (+1 -1)
</details>
### 📄 Description
- Rename builder methods from setFoo() to foo(). As of Java 17, the getFoo()/setFoo(value) naming convention has been effectively replaced with foo()/foo(value). Especially for a pre-1.0 project, it makes sense to align with this development.
- Do not rename addFoo() builder methods to distinguish them from setters.
- Change HttpClientInitException to extend RuntimeException instead of PklException. Except for PklBugException, no other exception class extends PklException.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/329
Author: @odenix
Created: 3/17/2024
Status: ❌ Closed
Base:
main← Head:polish-http📝 Commits (1)
6440fa3Polish HttpClient API📊 Changes
10 files changed (+21 additions, -24 deletions)
View changed files
📝
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliBaseOptions.kt(+1 -1)📝
pkl-core/src/main/java/org/pkl/core/http/HttpClient.java(+7 -8)📝
pkl-core/src/main/java/org/pkl/core/http/HttpClientBuilder.java(+4 -4)📝
pkl-core/src/main/java/org/pkl/core/http/HttpClientInitException.java(+1 -3)📝
pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java(+1 -1)📝
pkl-core/src/test/kotlin/org/pkl/core/StackFrameTransformersTest.kt(+1 -1)📝
pkl-core/src/test/kotlin/org/pkl/core/http/HttpClientTest.kt(+3 -3)📝
pkl-core/src/test/kotlin/org/pkl/core/packages/PackageResolversTest.kt(+1 -1)📝
pkl-core/src/test/kotlin/org/pkl/core/project/ProjectDependenciesResolverTest.kt(+1 -1)📝
pkl-core/src/test/kotlin/org/pkl/core/project/ProjectTest.kt(+1 -1)📄 Description
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.