Upgrade to Kotlin 1.4 M2

- The compiler is configured to retain compatibility with Kotlin 1.3.
- Explicit API mode is not yet enabled but could be in the future.
- A workaround for Gradle build is required for now, see
  https://youtrack.jetbrains.com/issue/KT-39610 for more details.
- Some exceptions thrown by Kotlin have changed to NullPointerException,
  see https://youtrack.jetbrains.com/issue/KT-22275 for more details.

Closes gh-24171
This commit is contained in:
Sébastien Deleuze
2020-06-16 15:07:13 +02:00
parent 97aba77cc1
commit 2a74eff10f
9 changed files with 45 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -139,7 +139,7 @@ class RequestParamMethodArgumentResolverKotlinTests {
@Test
fun resolveNonNullableNotRequiredWithoutParameter() {
assertThatExceptionOfType(TypeCastException::class.java).isThrownBy {
assertThatExceptionOfType(NullPointerException::class.java).isThrownBy {
resolver.resolveArgument(nonNullableParamNotRequired, null, webRequest, binderFactory) as String
}
}
@@ -221,7 +221,7 @@ class RequestParamMethodArgumentResolverKotlinTests {
request.method = HttpMethod.POST.name
request.contentType = MediaType.MULTIPART_FORM_DATA_VALUE
assertThatExceptionOfType(TypeCastException::class.java).isThrownBy {
assertThatExceptionOfType(NullPointerException::class.java).isThrownBy {
resolver.resolveArgument(nonNullableMultipartParamNotRequired, null, webRequest, binderFactory) as MultipartFile
}
}