-
Notifications
You must be signed in to change notification settings - Fork 45
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
Conversation
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class AbstractRestClientTest { |
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.
we need to register the Class in *Test*Suit
like other tests
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"); |
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.
Consider a better way to handle the case here
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
This PR needs to be manually cherry-picked into the server repository afterwards, after apache/incubator-hugegraph#2628 is merged. cc @imbajin |
As title.
Close #145