You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't dive too deep into this (and for some reason HashSet<String> does not have this issue), but the easiest way to fix this would be to use Kotlin's built-in typeOf in Configurate's Kotlin extension functions. As an additional benefit, this also removes the overhead of tons of anonymous classes.
Since Kotlin's type variance works different, there are some issues when using
io.leangen.geantyref.TypeToken
:In Java, this works as expected:
In Kotlin, this interpreted wrongly:
This can then lead to unexpected exceptions, as Configurate won't find serializes for type
? extends String
:I didn't dive too deep into this (and for some reason
HashSet<String>
does not have this issue), but the easiest way to fix this would be to use Kotlin's built-intypeOf
in Configurate's Kotlin extension functions. As an additional benefit, this also removes the overhead of tons of anonymous classes.The text was updated successfully, but these errors were encountered: