Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit dac7bcc

Browse files
theScrabiabelgardep
authored andcommitted
pleasure the linter
1 parent 270e127 commit dac7bcc

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/StatusRequester.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ internal class StatusRequester {
4848
fun updateLocationWithRedirectPath(oldLocation: String, redirectedLocation: String): String {
4949
if (!redirectedLocation.startsWith("/"))
5050
return redirectedLocation
51-
val oldLocation = URL(oldLocation)
52-
return URL(oldLocation.protocol, oldLocation.host, oldLocation.port, redirectedLocation).toString()
51+
val oldLocationURL = URL(oldLocation)
52+
return URL(oldLocationURL.protocol, oldLocationURL.host, oldLocationURL.port, redirectedLocation).toString()
5353
}
5454

5555
private fun getGetMethod(url: String): GetMethod {

owncloudComLibrary/src/test/java/com/owncloud/android/lib/StatusRequestorTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class StatusRequestorTest {
3333

3434
@Test
3535
fun `update location with an absolute path`() {
36-
val newLocation = requestor.updateLocationWithRedirectPath(TEST_DOMAIN, "$TEST_DOMAIN/subdir")
36+
val newLocation = requestor.updateLocationWithRedirectPath(TEST_DOMAIN, "$TEST_DOMAIN$SUB_PATH")
3737
assertEquals("$TEST_DOMAIN$SUB_PATH", newLocation)
3838
}
3939

@@ -46,9 +46,7 @@ class StatusRequestorTest {
4646

4747
@Test
4848
fun `update location with a relative path`() {
49-
val newLocation = requestor.updateLocationWithRedirectPath(
50-
TEST_DOMAIN, SUB_PATH
51-
)
49+
val newLocation = requestor.updateLocationWithRedirectPath(TEST_DOMAIN, SUB_PATH)
5250
assertEquals("$TEST_DOMAIN$SUB_PATH", newLocation)
5351
}
5452

0 commit comments

Comments
 (0)