Add ArrayEditor and more misc editor tests and fix NullReferenceException bugs#1181
Merged
zsd4yr merged 4 commits intodotnet:masterfrom Jun 21, 2019
Merged
Add ArrayEditor and more misc editor tests and fix NullReferenceException bugs#1181zsd4yr merged 4 commits intodotnet:masterfrom
zsd4yr merged 4 commits intodotnet:masterfrom
Conversation
zsd4yr
reviewed
Jun 20, 2019
src/System.Windows.Forms.Design.Editors/src/System/ComponentModel/Design/ArrayEditor.cs
Outdated
Show resolved
Hide resolved
zsd4yr
reviewed
Jun 20, 2019
src/System.Windows.Forms.Design.Editors/src/System/ComponentModel/Design/ArrayEditor.cs
Outdated
Show resolved
Hide resolved
danmoseley
reviewed
Jun 20, 2019
| } | ||
| else | ||
| { | ||
| return new object[0]; |
Member
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
@hughbe would you mind creating an issue for this larger cleanup?
zsd4yr
approved these changes
Jun 21, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.