fix: made the runway visibility ranges integer.#694
Conversation
|
Please check on sonarcloud https://sonarcloud.io/project/pull_requests_list?id=io.github.mivek%3AmetarParser that the PR does not add any issue. |
There was a problem hiding this comment.
Pull Request Overview
This PR changes the runway visibility range fields from int to Integer to allow for a null value when no runway visibility is provided. Key changes include updating the RunwayInfo model to use Integer for minRange and maxRange and modifying the corresponding tests to expect null values for maxRange.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| metarParser-parsers/src/test/java/io/github/mivek/command/metar/RunwayCommandTest.java | Updated tests to assert that maxRange returns null when no value is provided. |
| metarParser-entities/src/main/java/io/github/mivek/model/RunwayInfo.java | Changed type of minRange and maxRange to Integer and updated getters/setters accordingly. |
Comments suppressed due to low confidence (3)
metarParser-entities/src/main/java/io/github/mivek/model/RunwayInfo.java:72
- Update the Javadoc for getMinRange() to mention that it may return null when no runway visibility value is available.
public Integer getMinRange() {
metarParser-entities/src/main/java/io/github/mivek/model/RunwayInfo.java:90
- Update the Javadoc for getMaxRange() to clarify that null is returned when no runway visibility is provided.
public Integer getMaxRange() {
metarParser-parsers/src/test/java/io/github/mivek/command/metar/RunwayCommandTest.java:40
- [nitpick] Consider adding a test case to verify the behavior when minRange is null if null is a valid scenario for runway visibility ranges.
assertEquals(600, ri.getMinRange());
This allows to have a null value instead of a 0 when there is no value.
d421274 to
49ba715
Compare
|
@mivek Thanks a lot, looks good to me |
|
🎉 This PR is included in version 2.18.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This allows to have a null value instead of a 0 when there is no value.