-
Notifications
You must be signed in to change notification settings - Fork 614
[client-v2] Fix the build #2486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 To request another review, post a new comment with "/windsurf-review".
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java
Outdated
Show resolved
Hide resolved
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates HttpAPIClientHelper to be compatible with JDK 8 by removing reliance on String.isBlank() and adjusting the URLEncoder.encode invocation.
- Replace
String.isBlank()with a null-safetrim().isEmpty()check - Use the JDK 8
URLEncoder.encode(String, String)overload and add exception handling - Import
UnsupportedEncodingExceptionand wrap encoding failures inClientException
Comments suppressed due to low confidence (1)
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java:778
- [nitpick] The exception message is a bit unclear; consider rewording to "Failed to encode header value to UTF-8" for greater accuracy and consistency.
throw new ClientException("Failed to convert string to UTF8" , e);
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java
Outdated
Show resolved
Hide resolved
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java
Outdated
Show resolved
Hide resolved
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java
Show resolved
Hide resolved
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
|




Summary
Rewrote to use JDK 8 API (String.isBlank() is useless because it requires null check)
Checklist
Delete items not relevant to your PR: