Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add misc Design tests and fix a NullRef bug #807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 19, 2019

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Apr 16, 2019

Fixes #806

@hughbe hughbe requested a review from a team as a code owner April 16, 2019 16:54
@@ -21,7 +21,7 @@ public class WindowsFormsDesignerOptionService : DesignerOptionService
/// </summary>
protected override void PopulateOptionCollection(DesignerOptionCollection options)
{
if (options.Parent == null)
if (options?.Parent == null)
{
DesignerOptions designerOptions = CompatibilityOptions;
if (designerOptions != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

If options is null, then this evaluation is now true. What happens then options reaches CreateOptionCollection(options, "DesignerOptions", designerOptions);?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK... looks like I accidentally subclassed the wrong thing so weren't great here.

@codecov
Copy link

codecov bot commented Apr 16, 2019

Codecov Report

Merging #807 into master will increase coverage by 0.09706%.
The diff coverage is 100%.

@@                Coverage Diff                 @@
##             master        #807         +/-   ##
==================================================
+ Coverage   27.4977%   27.59476%   +0.09706%     
==================================================
  Files          1055        1061          +6     
  Lines        291188      291414        +226     
  Branches      38518       38521          +3     
==================================================
+ Hits          80070       80415        +345     
+ Misses       207060      206939        -121     
- Partials       4058        4060          +2
Flag Coverage Δ
#Debug 27.59476% <100%> (+0.09706%) ⬆️
#production 18.0919% <100%> (+0.03304%) ⬆️
#test 98.63591% <100%> (+0.00493%) ⬆️

@zsd4yr zsd4yr merged commit b3e1c27 into dotnet:master Apr 19, 2019
@hughbe hughbe deleted the temp-designer-tests branch April 19, 2019 17:04
@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.

WindowsFormsDesignerOptionService.PopulateOptionCollection(null) throws NRE should be a nop
2 participants