Skip to content
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

Open
ghost opened this issue Apr 7, 2017 · 1 comment
Open

Kotlin NPE when deserializing empty Kotlin's MutableList #64

ghost opened this issue Apr 7, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 7, 2017

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

@sockeqwe
Copy link
Contributor

sockeqwe commented Apr 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant