KEMBAR78
Revert part of #30777 to allow empty strings to be converted to PointCollection by mattleibow · Pull Request #30823 · dotnet/maui · GitHub
Skip to content

Conversation

@mattleibow
Copy link
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

The PR #30777 added an additional check that may be incorrect and is now filing tests. Regardless of perfect code, this behavior should be reverted until an investigation is done.

However, I think that the change was more to fix the nullability warnings and the better fix may have been to remove the ? from the ToString part.

Issues Fixed

Reverts part of #30777

@Copilot Copilot AI review requested due to automatic review settings July 24, 2025 21:41
@mattleibow mattleibow requested a review from a team as a code owner July 24, 2025 21:41
Copy link
Contributor

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 reverts part of the changes from #30777 that added validation to prevent null or empty strings from being converted to PointCollection. The change removes the null/whitespace check and associated exception throwing, allowing empty strings to be processed by the conversion logic again.

Key Changes:

  • Removes null/whitespace validation that was throwing an InvalidOperationException
  • Simplifies the string conversion by removing the null-conditional operator
  • Allows empty strings to proceed through the conversion process
Comments suppressed due to low confidence (1)

src/Controls/src/Core/Shapes/PointCollectionConverter.cs:28

  • The behavior change of allowing empty strings to be converted to PointCollection should have corresponding test cases to validate the expected behavior. Please ensure test cases exist in TestCases.Shared.Tests that verify empty string conversion works correctly.
			string[] points = strValue.Split(new char[] { ' ', ',' });

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@PureWeen PureWeen merged commit a1715e4 into net10.0 Jul 25, 2025
129 checks passed
@PureWeen PureWeen deleted the dev/nulls-are-collections branch July 25, 2025 03:37
@PureWeen PureWeen added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label Aug 19, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants