Skip to content
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

NetworkHelper updates to fix crashes logged #1682

Merged
merged 2 commits into from
Dec 6, 2017
Merged

Conversation

hermitdave
Copy link
Contributor

Issue: #1645

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting)
[x] Refactoring (no functional changes, no api changes)
[ ] Build or CI related changes
[ ] Documentation content changes
[ ] Sample app changes
[ ] Other... Please describe:

What is the current behavior?

There are no exception handlers and passing null when initialising the NetworkHelper isn't ideal.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added / updated (for bug fixes / features)
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)

What is the new behavior?

Add UpdateConnectionInformation method to NetworkHelper
Add try catch to UpdateConnectionInformation
Lock NetworkHelper.ConnectionInformation before calling update.
Add Reset method to ConnectionInformation
Tweaks to ConnectionInformation.UpdateConnectionInformation method

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Add UpdateConnectionInformation method to NetworkHelper
Add try catch to UpdateConnectionInformation
Lock NetworkHelper.ConnectionInformation before calling update.
Add Reset method to ConnectionInformation
Tweaks to ConnectionInformation.UpdateConnectionInformation method
@hermitdave hermitdave requested review from nmetulev and Odonno December 5, 2017 12:20
@hermitdave hermitdave changed the title NetworkHelper updates to address # NetworkHelper updates to fix potential crash Dec 5, 2017
@hermitdave hermitdave changed the title NetworkHelper updates to fix potential crash NetworkHelper updates to fix crashes logged Dec 5, 2017
Copy link
Contributor

@nmetulev nmetulev left a comment

Choose a reason for hiding this comment

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

Looks good other than the change in the virtual method definition.

@@ -30,22 +30,20 @@ public class ConnectionInformation
/// Updates the current object based on profile passed.
/// </summary>
/// <param name="profile">instance of <see cref="ConnectionProfile"/></param>
public virtual void UpdateConnectionInformation(ConnectionProfile profile)
public void UpdateConnectionInformation(ConnectionProfile profile)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this be considered a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I consider that method as not being sufficient for anyone to override.

How and why it was marked virtual is a mystery to me.

For anyone insane enough to inherit from connection information object yes it's a bragging change though I'm at loss as to why one would.

Copy link
Contributor

Choose a reason for hiding this comment

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

So it sound like this is fixing a bug then instead ;)

Approved

@hermitdave hermitdave merged commit a56391f into master Dec 6, 2017
@windowstoolkitbot
Copy link

This PR is linked to unclosed issues. Please check if one of these issues should be closed: #1645

@hermitdave hermitdave deleted the HD-NetworkHelper branch December 6, 2017 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants