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

Fix a wrong if condition #1182

Merged
merged 2 commits into from Jun 14, 2018

Conversation

Projects
None yet
4 participants
@mrdotmoon
Contributor

mrdotmoon commented Jun 6, 2018

Issues

Fix a wrong if condition

@xuzhg

xuzhg approved these changes Jun 6, 2018

@@ -146,7 +146,7 @@ internal void SetInstanceAnnotations(string navigationPropertyName, ODataResourc
internal IDictionary<string, object> ConvertToClrInstanceAnnotations(ICollection<ODataInstanceAnnotation> instanceAnnotations)
{
var clientInstanceAnnotationValue = new Dictionary<string, object>(StringComparer.Ordinal);
if (instanceAnnotations != null || instanceAnnotations.Count > 0)
if (instanceAnnotations != null && instanceAnnotations.Count > 0)

This comment has been minimized.

@biaol-odata

biaol-odata Jun 6, 2018

Member

Should we just remove the "&& instanceAnnotations.Count > 0" check completely?

This comment has been minimized.

@mikepizzo

mikepizzo Jun 7, 2018

Member

Yes; we should be able to get rid of the instanceAnnotations.Count check all together.

@biaol-odata

This comment has been minimized.

Member

biaol-odata commented Jun 7, 2018

@mrdotmoon Have you got a chance to look at the comment above and see whether it makes sense? Thanks.

@mrdotmoon

This comment has been minimized.

Contributor

mrdotmoon commented Jun 7, 2018

@biaol-odata yeah, it makes sense. Updated, thanks.

@biaol-odata biaol-odata merged commit 9b8f541 into OData:master Jun 14, 2018

2 checks passed

continuous-integration/vsts The build trigger has fired.
Details
license/cla All CLA requirements met.

biaol-odata added a commit to biaol-odata/odata.net that referenced this pull request Jun 26, 2018

Fix a wrong if condition (OData#1182)
* Fix a wrong if condition

* Remove count check

biaol-odata added a commit that referenced this pull request Jun 26, 2018

Fix a wrong if condition (#1182)
* Fix a wrong if condition

* Remove count check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment