Skip to content

[Essentials] Longitude Validation#27784

Merged
jfversluis merged 1 commit intodotnet:mainfrom
kubaflo:fix-27774
Feb 16, 2025
Merged

[Essentials] Longitude Validation#27784
jfversluis merged 1 commit intodotnet:mainfrom
kubaflo:fix-27774

Conversation

@kubaflo
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo commented Feb 13, 2025

Issues Fixed

Fixes #27774

@kubaflo kubaflo requested a review from a team as a code owner February 13, 2025 18:37
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 13, 2025
@kubaflo kubaflo added area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info and removed community ✨ Community Contribution labels Feb 13, 2025
@jfversluis jfversluis self-assigned this Feb 13, 2025
@jfversluis
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Failing tests unrelated

@jfversluis jfversluis merged commit 89c0eb8 into dotnet:main Feb 16, 2025
120 of 123 checks passed
@jfversluis jfversluis added this to the .NET 9 SR5 milestone Feb 16, 2025
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

🚨 API change(s) detected @davidbritch FYI

@jfversluis
Copy link
Copy Markdown
Member

Not sure if anything about this is described in the docs. Technically a behavioral breaking change although I think it’s for the better.

@kubaflo
Copy link
Copy Markdown
Contributor Author

kubaflo commented Feb 16, 2025

Agreed! Devs can easily implement the previous logic and it was confusing that latitude didn't work as longitude

while (Longitude <= -180)
Longitude += 360;
// check if longitude is in (-180, 180]
if (Math.Abs(latitude) > 180)
Copy link
Copy Markdown
Contributor

@dartasen dartasen Feb 16, 2025

Choose a reason for hiding this comment

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

@kubaflo @jfversluis I feel like it's a wrong copy paste here, it should be longitude inside the Math.abs...
I guess it does describe that this area is lacking of unit tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're absolutely right. I'm sorry about that. Here's the fix: #27834
@jfversluis could you please /azp

@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info t/breaking 💥

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excessive Looping Due to Missing Longitude Validation in Location.shared.cs

3 participants