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

159 fix issue when journaldocked message is missing landing pad info #160

Conversation

pveeckhout
Copy link
Contributor

fixes #159

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.
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 pveeckhout added the bug Something isn't working label Mar 24, 2024
@pveeckhout pveeckhout self-assigned this Mar 24, 2024
@pveeckhout pveeckhout requested a review from a team as a code owner March 24, 2024 21:02
@pveeckhout pveeckhout linked an issue Mar 24, 2024 that may be closed by this pull request
Copy link
Collaborator

@Daniel-J-Mason Daniel-J-Mason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had UNKNOWN as our standing for this enum. our database is currently loaded with UNKNOWN's. Just need to fix our enum, and database to account for these changes. We'll have to run a db update to convert all UNKOWN's to null.

I dont think this is unreasonable. it'd be weird to keep a stand-in for null, as we will have many null fields across our database and we should handle them the same.

@pveeckhout
Copy link
Contributor Author

We had UNKNOWN as our standing for this enum. our database is currently loaded with UNKNOWN's. Just need to fix our enum, and database to account for these changes. We'll have to run a db update to convert all UNKOWN's to null.

I dont think this is unreasonable. it'd be weird to keep a stand-in for null, as we will have many null fields across our database and we should handle them the same.

These changes are for exploration module, not for trade. These changes have not impact on the trade, as trade will try to request this data. and is completely agnostic of how exploration stores this data

@pveeckhout pveeckhout merged commit 2d47b01 into development Mar 25, 2024
4 checks passed
@pveeckhout pveeckhout deleted the 159-fix-issue-when-journaldocked-message-is-missing-landing-pad-info branch March 25, 2024 00:42
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 this pull request may close these issues.

fix issue when JournalDocked message is missing landing pad info
2 participants