[Chore][Core] Remove useless parameter in ConfigBuilder#9494
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes an unused isJson parameter from various ConfigBuilder.of methods and updates all call sites to the new two-argument signature.
- Dropped the third boolean flag (
isJson) fromConfigBuilder.ofcalls in server and starter modules. - Removed obsolete overloaded methods in the e2e
ConfigBuilderutility. - Aligned method signatures across engine, core-starter, and e2e-common modules.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| seatunnel-engine/…/RestUtil.java | Updated buildConfig and buildConfigList to call two-arg of |
| seatunnel-e2e/…/ConfigBuilder.java (e2e-common) | Removed of(Map, boolean) and of(Map) overloads |
| seatunnel-core/…/ConfigBuilder.java (core-starter) | Simplified of(Map) to delegate to two-arg of |
Comments suppressed due to low confidence (3)
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/utils/RestUtil.java:76
- Consider adding unit tests for
buildConfigandbuildConfigListto verify that removing theisJsonparameter does not alter JSON-based parsing behavior.
return ConfigBuilder.of(objectMap, isEncrypt);
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java:106
- [nitpick] The removal of the
isJsonflag changes default parsing assumptions; please update the JavaDoc to explain how input maps are interpreted and what formats are supported.
public static Config of(@NonNull Map<String, Object> objectMap, boolean isEncrypt) {
seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ConfigBuilder.java:71
- Since the
of(Map, boolean)overload was removed, ensure all test utilities that rely on encrypted parsing are updated or consider reintroducing a dedicated method for encryption scenarios to keep tests clear.
public static Config of(@NonNull Map<String, Object> objectMap) {
corgy-w
approved these changes
Jun 26, 2025
hawk9821
approved these changes
Jun 26, 2025
dybyte
pushed a commit
to dybyte/seatunnel
that referenced
this pull request
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this pull request
Remove useless parameter in ConfigBuilder
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide