Skip to content

Add ArrayEditor and more misc editor tests and fix NullReferenceException bugs#1181

Merged
zsd4yr merged 4 commits intodotnet:masterfrom
hughbe:arrayeditor-tests
Jun 21, 2019
Merged

Add ArrayEditor and more misc editor tests and fix NullReferenceException bugs#1181
zsd4yr merged 4 commits intodotnet:masterfrom
hughbe:arrayeditor-tests

Conversation

@hughbe
Copy link
Contributor

@hughbe hughbe commented Jun 20, 2019

No description provided.

@hughbe hughbe requested a review from a team as a code owner June 20, 2019 12:05
}
else
{
return new object[0];
Copy link
Member

Choose a reason for hiding this comment

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

I see 319 hits for new [a-zA-Z]+\[0\] in the Winforms sources. Of course, switching to Array.Empty can in theory break (it's now reference equal) but it's pretty unlikely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should make the wider move to array.empty but imo the change should be made when writing tests and performing the appropriate performance optimisations

Copy link
Contributor

Choose a reason for hiding this comment

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

@hughbe would you mind creating an issue for this larger cleanup?

Copy link
Contributor

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍

@zsd4yr zsd4yr merged commit ec2eca5 into dotnet:master Jun 21, 2019
@hughbe hughbe deleted the arrayeditor-tests branch June 21, 2019 19:06
@ghost ghost locked as resolved and limited conversation to collaborators Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants