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

Color and Team don't get initialised when they should be #295

Open
anarchuser opened this issue Sep 21, 2020 · 2 comments
Open

Color and Team don't get initialised when they should be #295

anarchuser opened this issue Sep 21, 2020 · 2 comments
Labels
Milestone

Comments

@anarchuser
Copy link
Contributor

anarchuser commented Sep 21, 2020

With Kotlin, you shouldn't get unchecked NullPointerExceptions or the related IllegalArgumentException. However, sometimes, Colors and Teams aren't initialised even though they should be, resulting in exceptions that shouldn't exist.

7042b6b (#294) fails due to this.

@anarchuser anarchuser added the action:investigate Gathering information label Sep 21, 2020
@anarchuser
Copy link
Contributor Author

Another artifact resulting from the same issue for Team:
https://github.com/CAU-Kiel-Tech-Inf/backend/blob/fd9c93e2ec742fbbe14ccb48522a3c921fcd3968/plugin/src/shared/sc/plugin2021/GameState.kt#L44-L49

The line commented out should suffice. However, due to this issue, the more complicated setup with the when clause is needed.

@anarchuser anarchuser changed the title Color initialisation fails in some places, leading to obscure IllegalArgumentExceptions Color, ITeam and Team don't get initialised when they should be Sep 22, 2020
@anarchuser anarchuser changed the title Color, ITeam and Team don't get initialised when they should be Color, ITeam and Team don't get initialised when they should be Sep 22, 2020
@anarchuser
Copy link
Contributor Author

Potential reason: XStream doesn't serialise them properly

@anarchuser anarchuser changed the title Color, ITeam and Team don't get initialised when they should be Color and Team don't get initialised when they should be Sep 22, 2020
@xeruf xeruf added this to the long-term milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants