Fix either type adapter not consuming peeked null
This commit is contained in:
parent
8dd176ff87
commit
0340381357
@ -4,7 +4,7 @@ kotlin.code.style=official
|
|||||||
specifyKotlinAsDependency=false
|
specifyKotlinAsDependency=false
|
||||||
|
|
||||||
projectGroup=ru.dbotthepony.kommons
|
projectGroup=ru.dbotthepony.kommons
|
||||||
projectVersion=2.9.19
|
projectVersion=2.9.20
|
||||||
|
|
||||||
guavaDepVersion=33.0.0
|
guavaDepVersion=33.0.0
|
||||||
gsonDepVersion=2.8.9
|
gsonDepVersion=2.8.9
|
||||||
|
@ -32,7 +32,7 @@ object EitherTypeAdapter : TypeAdapterFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun read(`in`: JsonReader): Either<Any, Any>? {
|
override fun read(`in`: JsonReader): Either<Any, Any>? {
|
||||||
if (`in`.peek() == JsonToken.NULL)
|
if (`in`.consumeNull())
|
||||||
return null
|
return null
|
||||||
|
|
||||||
val elem = elemAdapter.read(`in`)
|
val elem = elemAdapter.read(`in`)
|
||||||
|
Loading…
Reference in New Issue
Block a user