Skip to content

Commit 98b4760

Browse files
committed
lint code
1 parent b5b3acb commit 98b4760

File tree

222 files changed

+13338
-22103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+13338
-22103
lines changed

xap-sdk/build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ publishing {
6464
from(components["java"])
6565
artifactId = project.property("ARTIFACT_NAME").toString()
6666
groupId = project.property("GROUP_ID").toString()
67-
version = if (project.hasProperty("SNAPSHOT_VERSION")) {
68-
project.property("SNAPSHOT_VERSION").toString()
69-
} else {
70-
project.property("VERSION").toString()
71-
}
67+
version =
68+
if (project.hasProperty("SNAPSHOT_VERSION")) {
69+
project.property("SNAPSHOT_VERSION").toString()
70+
} else {
71+
project.property("VERSION").toString()
72+
}
7273
description = project.findProperty("DESCRIPTION")?.toString()
7374

7475
pom {

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/AsyncXapClient.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import com.expediagroup.sdk.xap.core.AsyncRequestExecutor
1414
import java.util.concurrent.CompletableFuture
1515

1616
class AsyncXapClient private constructor(
17-
config: AsyncXapClientConfiguration
17+
config: AsyncXapClientConfiguration,
1818
) : AsyncRestClient() {
1919
private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment)
2020

2121
override val restExecutor: AsyncRestExecutor =
2222
AsyncRestExecutor(
2323
mapper = XAP_OBJECT_MAPPER,
2424
serverUrl = apiEndpoint.endpoint,
25-
requestExecutor = AsyncRequestExecutor(configuration = config)
25+
requestExecutor = AsyncRequestExecutor(configuration = config),
2626
)
2727

2828
fun execute(operation: OperationNoResponseBodyTrait): CompletableFuture<Response<Nothing?>> = restExecutor.execute(operation)

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import com.expediagroup.sdk.xap.configuration.XapClientConfiguration
1414
import com.expediagroup.sdk.xap.core.RequestExecutor
1515

1616
class XapClient private constructor(
17-
config: XapClientConfiguration
17+
config: XapClientConfiguration,
1818
) : RestClient() {
1919
private val apiEndpoint: ApiEndpoint = EndpointProvider.getXapApiEndpoint(config.environment)
2020

@@ -29,9 +29,9 @@ class XapClient private constructor(
2929
key = config.key,
3030
secret = config.secret,
3131
environment = ClientEnvironment.PROD,
32-
transport = config.transport
33-
)
34-
)
32+
transport = config.transport,
33+
),
34+
),
3535
)
3636

3737
fun execute(operation: OperationNoResponseBodyTrait): Response<Nothing?> = restExecutor.execute(operation)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.expediagroup.sdk.xap.configuration
22

33
data class ApiEndpoint(
4-
val endpoint: String
4+
val endpoint: String,
55
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.expediagroup.sdk.xap.configuration
22

33
enum class ClientEnvironment {
4-
PROD
4+
PROD,
55
}

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/EndpointProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ internal object EndpointProvider {
88

99
return try {
1010
ApiEndpoint(
11-
XapApiEndpoint.valueOf(env.name).url
11+
XapApiEndpoint.valueOf(env.name).url,
1212
)
1313
} catch (e: IllegalArgumentException) {
1414
throw ExpediaGroupConfigurationException(
1515
"""
1616
Unsupported environment [$environment] for Supply API.
1717
Supported environments are [${XapApiEndpoint.entries.joinToString(", ")}]
18-
"""
18+
""",
1919
)
2020
}
2121
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.expediagroup.sdk.xap.configuration
22

33
enum class XapApiEndpoint(
4-
val url: String
4+
val url: String,
55
) {
6-
PROD("https://apim.expedia.com")
6+
PROD("https://apim.expedia.com"),
77
}

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/configuration/XapClientConfiguration.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ data class XapClientConfiguration(
99
val key: String,
1010
val secret: String,
1111
val environment: ClientEnvironment? = null,
12-
val transport: Transport? = null
12+
val transport: Transport? = null,
1313
)
1414

1515
data class AsyncXapClientConfiguration(
1616
val key: String,
1717
val secret: String,
1818
val environment: ClientEnvironment? = null,
19-
val asyncTransport: AsyncTransport? = null
19+
val asyncTransport: AsyncTransport? = null,
2020
)
2121

2222
abstract class ClientBuilder<T : RestClient> {
@@ -48,7 +48,7 @@ abstract class ClientBuilder<T : RestClient> {
4848
key = key!!,
4949
secret = secret!!,
5050
environment = environment,
51-
transport = transport
51+
transport = transport,
5252
)
5353
}
5454
}
@@ -82,7 +82,7 @@ abstract class AsyncClientBuilder<T : AsyncRestClient> {
8282
key = key!!,
8383
secret = secret!!,
8484
environment = environment,
85-
asyncTransport = asyncTransport
85+
asyncTransport = asyncTransport,
8686
)
8787
}
8888
}

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/ApiKeyHeaderStep.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import com.expediagroup.sdk.core.http.Request
44
import com.expediagroup.sdk.core.pipeline.RequestPipelineStep
55

66
class ApiKeyHeaderStep(
7-
private val apiKey: String
7+
private val apiKey: String,
88
) : RequestPipelineStep {
99
override fun invoke(request: Request): Request =
10-
request.newBuilder()
10+
request
11+
.newBuilder()
1112
.addHeader("key", apiKey)
1213
.build()
1314
}

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/core/AsyncRequestExecutor.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import com.expediagroup.sdk.xap.configuration.AsyncXapClientConfiguration
1313
import org.slf4j.LoggerFactory
1414

1515
class AsyncRequestExecutor(
16-
configuration: AsyncXapClientConfiguration
16+
configuration: AsyncXapClientConfiguration,
1717
) : AbstractAsyncRequestExecutor(configuration.asyncTransport) {
1818
private val authManager =
1919
BasicAuthenticationManager(
20-
credentials = Credentials(configuration.key, configuration.secret)
20+
credentials = Credentials(configuration.key, configuration.secret),
2121
)
2222

2323
override val executionPipeline =
@@ -26,12 +26,12 @@ class AsyncRequestExecutor(
2626
listOf(
2727
RequestHeadersStep(),
2828
BasicAuthenticationStep(authManager),
29-
RequestLoggingStep(logger)
29+
RequestLoggingStep(logger),
3030
),
3131
responsePipeline =
3232
listOf(
33-
ResponseLoggingStep(logger)
34-
)
33+
ResponseLoggingStep(logger),
34+
),
3535
)
3636

3737
companion object {

0 commit comments

Comments
 (0)