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

EdgeHub: Fix error if client does not send product info #1496

Merged
merged 6 commits into from
Aug 6, 2019

Conversation

varunpuranik
Copy link
Contributor

If client does not send product info, EdgeHub should simply send its own user agent string.

@varunpuranik varunpuranik added the 1.0.9 Targeted for 1.0.9 release label Jul 31, 2019
@myagley myagley added this to the 1.0.9 milestone Aug 1, 2019
@damonbarry damonbarry changed the title EdgeHub: Fix error is client does not send product info EdgeHub: Fix error if client does not send product info Aug 5, 2019
@@ -10,7 +10,9 @@ public static T FromJson<T>(this string json)
{
if (string.IsNullOrWhiteSpace(json))
{
return default(T);
return typeof(T) == typeof(string)
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When converting from Json to object, if the json is empty string, and object is string, then return the empty string (instead of default(string) which is null). This prevents null refs down the call stack

@varunpuranik varunpuranik merged commit bb31324 into Azure:master Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.9 Targeted for 1.0.9 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants