Skip to content
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

feat(common): add a tool method encode #146

Merged
merged 10 commits into from
Aug 20, 2024
Merged

Conversation

Thespica
Copy link
Contributor

As title.

Close #145

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jul 17, 2024
import org.junit.Assert;
import org.junit.Test;

public class AbstractRestClientTest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to register the Class in *Test*Suit like other tests

@imbajin imbajin changed the title [Feature] Add a tool method encode. feat(common): add a tool method encode Jul 18, 2024
return uri.toASCIIString();
} catch (URISyntaxException e) {
throw new IllegalArgumentException("Failed to encode string: " + raw, e);
return URLEncoder.encode(raw, StandardCharsets.UTF_8.toString()).replace("+", "%20");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a better way to handle the case here

Copy link

codecov bot commented Aug 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.15%. Comparing base (c883f56) to head (3903d24).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #146   +/-   ##
=========================================
  Coverage     93.15%   93.15%           
  Complexity       65       65           
=========================================
  Files             9        9           
  Lines           263      263           
  Branches         22       22           
=========================================
  Hits            245      245           
  Misses            8        8           
  Partials         10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 20, 2024
@imbajin imbajin requested a review from VGalaxies August 20, 2024 08:14
@VGalaxies
Copy link
Contributor

This PR needs to be manually cherry-picked into the server repository afterwards, after apache/incubator-hugegraph#2628 is merged. cc @imbajin

@VGalaxies VGalaxies merged commit 311c499 into apache:master Aug 20, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add a tool method encode.
3 participants