mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-12 14:10:29 +00:00
fix: kotlin build interoperability
This commit is contained in:
parent
e7ef58ad3d
commit
ddf2eeef2e
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ import com.fasterxml.jackson.datatype.jdk8.Jdk8Module
|
|||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
|
||||
import com.intellij.util.xmlb.Converter
|
||||
|
||||
abstract class BaseConverter<T> protected constructor(private val typeReference: TypeReference<T>) : Converter<T>() {
|
||||
abstract class BaseConverter<T : Any> protected constructor(private val typeReference: TypeReference<T>) : Converter<T>() {
|
||||
private val objectMapper: ObjectMapper = ObjectMapper()
|
||||
.registerModule(Jdk8Module())
|
||||
.registerModule(JavaTimeModule())
|
||||
|
|
@ -20,7 +20,7 @@ abstract class BaseConverter<T> protected constructor(private val typeReference:
|
|||
}
|
||||
}
|
||||
|
||||
override fun toString(value: T & Any): String? {
|
||||
override fun toString(value: T): String? {
|
||||
try {
|
||||
return objectMapper.writeValueAsString(value)
|
||||
} catch (e: JsonProcessingException) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue