Skip to content

fix: made the runway visibility ranges integer.#694

Merged
mivek merged 1 commit intomainfrom
fix/runway_min_max_range_type
Jun 30, 2025
Merged

fix: made the runway visibility ranges integer.#694
mivek merged 1 commit intomainfrom
fix/runway_min_max_range_type

Conversation

@mivek
Copy link
Copy Markdown
Owner

@mivek mivek commented Jun 29, 2025

This allows to have a null value instead of a 0 when there is no value.

Copilot AI review requested due to automatic review settings June 29, 2025 07:08
@github-actions
Copy link
Copy Markdown

Please check on sonarcloud https://sonarcloud.io/project/pull_requests_list?id=io.github.mivek%3AmetarParser that the PR does not add any issue.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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());

@mivek mivek linked an issue Jun 29, 2025 that may be closed by this pull request
This allows to have a null value instead of a 0 when there is no value.
@mivek mivek force-pushed the fix/runway_min_max_range_type branch from d421274 to 49ba715 Compare June 29, 2025 07:16
@f-loris
Copy link
Copy Markdown
Contributor

f-loris commented Jun 30, 2025

@mivek Thanks a lot, looks good to me

@mivek mivek merged commit 5e3fcb1 into main Jun 30, 2025
11 checks passed
@mivek mivek deleted the fix/runway_min_max_range_type branch June 30, 2025 11:58
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.18.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RunwayInfo ranges yield 0 when no visibility information is provided

3 participants