Polishing.
Use ResolvableType for type assignability check when resolving Type from a KType. See #2324.
This commit is contained in:
@@ -72,4 +72,12 @@ class KotlinCopyMethodUnitTests {
|
||||
assertThat(copyMethod.shouldUsePublicCopyMethod(mappingContext.getRequiredPersistentEntity(DataClassKt.class)))
|
||||
.isTrue();
|
||||
}
|
||||
|
||||
@Test // #2324
|
||||
void shouldDetermineCopyMethodForParametrizedType() {
|
||||
|
||||
Optional<KotlinCopyMethod> copyMethod = KotlinCopyMethod.findCopyMethod(ImmutableKotlinPerson.class);
|
||||
|
||||
assertThat(copyMethod).isPresent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.mapping.model
|
||||
|
||||
import org.springframework.data.annotation.Id
|
||||
import java.time.LocalDateTime
|
||||
import java.util.*
|
||||
|
||||
@@ -59,3 +60,8 @@ data class WithCustomCopyMethod(
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
data class ImmutableKotlinPerson(
|
||||
@Id val name: String,
|
||||
val wasOnboardedBy: List<ImmutableKotlinPerson>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user