-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Replace DavUtils.lastSegmentOfUrl
by UrlUtils.lastSegment
#767
Replace DavUtils.lastSegmentOfUrl
by UrlUtils.lastSegment
#767
Conversation
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
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.
Looks good. We can already remove the DavUtils.lastSegmentOfUrl
.
Then the tests DavUtils.lastSegmentOfUrl
for will also have to be moved into UrlUtilsTest and testHttpUrl_lastSegment
Also, since fun HttpUrl.lastSegment(): String =
pathSegments.lastOrNull { it.isNotEmpty() } ?: "/" by a variable val HttpUrl.lastSegment: String
get() = pathSegments.lastOrNull { it.isNotEmpty() } ?: "/" At the end, for the Java conversion it's the same, but it's shorter to write 😅 |
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
…urlutilslastsegment
Yes please do so :) |
Signed-off-by: Arnau Mora Gras <[email protected]>
…urlutilslastsegment
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.
Test still fail, probably some minimal thing
3c18f50
to
5317294
Compare
47ef18b
to
39f8f2e
Compare
…urlutilslastsegment
Signed-off-by: Arnau Mora <[email protected]>
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.
Still fails
Signed-off-by: Arnau Mora <[email protected]>
The PR should be in Draft state during development. As soon as it's finished, it should be marked as Ready for review and a reviewer should be chosen.
See also: Writing A Great Pull Request Description
Purpose
Replaces all the usages of the deprecated
DavUtils.lastSegmentOfUrl
by the extension function ofUrl
(lastSegment()
).Short description
replaceWith
to the annotation.DavUtils.lastSegmentOfUrl
may be removed if desired.Checklist