Skip to content

Commit 0691d79

Browse files
JAVA-42811 Upgrade main Kotlin version
2 parents dfb6940 + a47cbb0 commit 0691d79

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

core-kotlin-modules/core-kotlin-6/src/test/kotlin/com/baeldung/elapsed/ElapsedTimeUnitTest.kt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import kotlin.time.ExperimentalTime
1010
import kotlin.time.TimedValue
1111
import kotlin.time.measureTime
1212
import kotlin.time.measureTimedValue
13-
import kotlin.time.milliseconds
1413
import kotlin.time.toDuration
1514

1615
class ElapsedTimeUnitTest {

core-kotlin-modules/core-kotlin-advanced-4/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
<properties>
5757
<kotlin-scripting.version>1.8.0</kotlin-scripting.version>
58+
<kotlin.version>2.0.21</kotlin.version>
5859
</properties>
5960

6061
</project>

core-kotlin-modules/core-kotlin-io/src/test/kotlin/com/baeldung/fileupload/FileUploadUnitTest.kt

+2-6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.github.tomakehurst.wiremock.client.WireMock.matching
88
import com.github.tomakehurst.wiremock.client.WireMock.post
99
import com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor
1010
import com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo
11+
import com.github.tomakehurst.wiremock.core.WireMockConfiguration
1112
import com.github.tomakehurst.wiremock.junit.WireMockRule
1213
import io.ktor.client.HttpClient
1314
import io.ktor.client.engine.cio.CIO
@@ -18,16 +19,12 @@ import io.ktor.client.statement.readText
1819
import io.ktor.http.Headers
1920
import io.ktor.http.HttpHeaders
2021
import kotlinx.coroutines.runBlocking
21-
import okhttp3.Call
22-
import okhttp3.Callback
2322
import okhttp3.MediaType.Companion.toMediaTypeOrNull
2423
import okhttp3.MultipartBody
2524
import okhttp3.OkHttpClient
2625
import okhttp3.Request
2726
import okhttp3.RequestBody.Companion.asRequestBody
28-
import okhttp3.Response
2927
import okhttp3.ResponseBody
30-
import okhttp3.internal.wait
3128
import org.junit.jupiter.api.AfterEach
3229
import org.junit.jupiter.api.BeforeEach
3330
import org.junit.Rule
@@ -38,7 +35,6 @@ import retrofit2.http.Multipart
3835
import retrofit2.http.POST
3936
import retrofit2.http.Part
4037
import java.io.File
41-
import java.io.IOException
4238

4339
fun uploadFileFuel(filePath: String, uploadUrl: String) {
4440
val file = File(filePath)
@@ -112,7 +108,7 @@ fun uploadFileRetrofit(filePath: String, uploadUrl: String) {
112108
class FileUploadUnitTest {
113109
@Rule
114110
@JvmField
115-
val wireMockRule = WireMockRule(8080)
111+
val wireMockRule = WireMockRule(WireMockConfiguration.wireMockConfig().dynamicPort())
116112

117113
@BeforeEach
118114
fun startWireMock() {

core-kotlin-modules/core-kotlin-strings-4/src/test/kotlin/com/baeldung/booleanValueOfKotlinEquivalent/BooleanValueOfKotlinEquivalentUnitTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fun convertStringToBooleanUsingRegex(input: String): Boolean {
7575
}
7676

7777
fun String.toBooleanValue(): Boolean =
78-
when (this.toLowerCase()) {
78+
when (this.lowercase()) {
7979
"true" -> true
8080
else -> false
8181
}

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@
803803
</profiles>
804804

805805
<properties>
806-
<kotlin.version>2.0.21</kotlin.version>
806+
<kotlin.version>2.1.0</kotlin.version>
807807
<kotlinx.version>1.7.1</kotlinx.version>
808808
<ktlint-cli.version>1.0.1</ktlint-cli.version>
809809

0 commit comments

Comments
 (0)