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

fix issue when JournalDocked message is missing landing pad info #159

Closed
pveeckhout opened this issue Mar 24, 2024 · 0 comments · Fixed by #160
Closed

fix issue when JournalDocked message is missing landing pad info #159

pveeckhout opened this issue Mar 24, 2024 · 0 comments · Fixed by #160
Assignees
Labels
bug Something isn't working

Comments

@pveeckhout
Copy link
Contributor

There is an issue with a message from JournalDocked where for some reason the landingPad info is omitted.

we need to strengthen the code base to handle this

@pveeckhout pveeckhout added the bug Something isn't working label Mar 24, 2024
@pveeckhout pveeckhout self-assigned this Mar 24, 2024
pveeckhout added a commit that referenced this issue Mar 24, 2024
The method 'getLandingPads' in 'MybatisStationEntityMapper.java' was refactored to improve functionality when mapping landing pad sizes. A new private method 'filterLandingPads' was added for handling empty landing pad maps. Additionally, tests were expanded in 'MybatisStationEntityMapperTest.java' to cover conditions when station landing pads are empty or null.
pveeckhout added a commit that referenced this issue Mar 24, 2024
The 'landingPadSizeFromPayload()' method in 'ReceiveJournalDockedService.java' has been updated to handle possibly null landing pads with the help of Optional. An Optional.ofNullable has been added to elegantly handle any potential null values of the payload's landing pads. This offers a more robust and foolproof way of mapping landing pad sizes.
pveeckhout added a commit that referenced this issue Mar 25, 2024
…160)

* #159 Refactor MybatisStationEntityMapper and expand tests

The method 'getLandingPads' in 'MybatisStationEntityMapper.java' was refactored to improve functionality when mapping landing pad sizes. A new private method 'filterLandingPads' was added for handling empty landing pad maps. Additionally, tests were expanded in 'MybatisStationEntityMapperTest.java' to cover conditions when station landing pads are empty or null.

* #159 Add null-check to landingPadSizeFromPayload method

The 'landingPadSizeFromPayload()' method in 'ReceiveJournalDockedService.java' has been updated to handle possibly null landing pads with the help of Optional. An Optional.ofNullable has been added to elegantly handle any potential null values of the payload's landing pads. This offers a more robust and foolproof way of mapping landing pad sizes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant