-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin NPE when deserializing empty Kotlin's MutableList #64
Comments
Yeah, that is a java optimization, which is not playing well with kotlin
null safety. Just initialize it with new ArrayList manually as temporary
work around.
Alexandr <[email protected]> schrieb am Fr., 7. Apr. 2017, 22:41:
… Data class:
@xml(name = "story-state")
data class StoryState(
@element(
typesByElement = arrayOf(
ElementNameMatcher(type = StoryPathElement.Telling::class),
ElementNameMatcher(type = StoryPathElement.Actions::class),
ElementNameMatcher(type = StoryPathElement.GameOver::class),
ElementNameMatcher(type = StoryPathElement.GameWin::class)
)
) val storyPath: MutableList<StoryPathElement> = mutableListOf()
)
And exception:
Caused by java.lang.IllegalArgumentException: Parameter specified as
non-null is null: method
kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter storyPath
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#64>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjnrpdZKVaK3EFMKYWWmzpOMJajLnWbks5rtp-UgaJpZM4M3XiI>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Data class:
And exception:
Caused by java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter storyPath
The text was updated successfully, but these errors were encountered: