Simplifying snippetizer link URL construction#217
Open
abayer wants to merge 3 commits intojenkinsci:masterfrom
Open
Simplifying snippetizer link URL construction#217abayer wants to merge 3 commits intojenkinsci:masterfrom
abayer wants to merge 3 commits intojenkinsci:masterfrom
Conversation
jglick
approved these changes
Apr 5, 2018
| } | ||
|
|
||
| return toAppend.toString(); | ||
| return req.getContextPath() + '/' + (i == null ? "" : i.getUrl()) + u; |
Member
There was a problem hiding this comment.
I assume you manually tested both cases here?
svanoort
reviewed
Apr 5, 2018
| } | ||
|
|
||
| return toAppend.toString(); | ||
| return req.getContextPath() + '/' + (i == null ? "" : i.getUrl()) + u; |
Member
There was a problem hiding this comment.
Wait, why did we remove the check for if the context path has a '/' on it? We had an actual stage view bug that resulted from a similar issue.
Edit: even if it "shouldn't" happen it's a harmless check.
bitwiseman
reviewed
Jun 20, 2019
| } | ||
|
|
||
| return toAppend.toString(); | ||
| return Paths.get( req.getContextPath(), i == null ? "" : i.getUrl(), u).toString(); |
Contributor
There was a problem hiding this comment.
Using Paths to concatenate class to handle slashes - will remove or add as needed.
Member
There was a problem hiding this comment.
I am little wary of using Path for URLs, would it not result in file system-specific behavior? Maybe fine, I just haven't seen it used in this kind of context.
Contributor
There was a problem hiding this comment.
And you would be correct. 😄
4aaec74 to
af2dcd1
Compare
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.
Minor cleanup after comments on #209