Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6507 +/- ##
=========================================
Coverage 70.33% 70.33%
Complexity 4909 4909
=========================================
Files 717 717
Lines 27950 27950
Branches 3295 3295
=========================================
Hits 19659 19659
Misses 7013 7013
Partials 1278 1278
|
Contributor
Contributor
|
@dudeuter will you add tests for this? |
Author
@RingerJK's work will make this change unnecessary in v2.9+ I was working on this as more of a workaround for this part of the Java SDK not decoding the URL properly. We might want to update the RouteOptions index URL Path parameters starting from the end. Which might make the decode method a little more robust. List<String> pathElements = Arrays.asList(url.getPath().split("/"));
Collections.reverse(pathElements);
optionsJson.addProperty("coordinates", URLDecoder.decode(pathElements.get(0), UTF_8));
optionsJson.addProperty("profile", URLDecoder.decode(pathElements.get(1), UTF_8));
optionsJson.addProperty("user", URLDecoder.decode(pathElements.get(2), UTF_8));That way if anyone's messing around with the basepath they'll be more likely to correctly parse their coordinates, and they can next their API as many arbitrary paths as they want. |
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.
Description
Fixes issues with silent waypoints, routes from the EV route planner, and BYOR.