Skip to content

Fix a wrong if condition - #1182

Merged
biaol-odata merged 2 commits into
OData:masterfrom
mrdotmoon:patch-2
Jun 14, 2018
Merged

biaol-odata merged 2 commits into
OData:masterfrom
mrdotmoon:patch-2

Conversation

@mrdotmoon

Copy link
Copy Markdown
Contributor

Issues

Fix a wrong if condition

{
var clientInstanceAnnotationValue = new Dictionary(StringComparer.Ordinal);
if (instanceAnnotations != null || instanceAnnotations.Count > 0)
if (instanceAnnotations != null && instanceAnnotations.Count > 0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@biaol-odata

Copy link
Copy Markdown
Contributor

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

@mrdotmoon

Copy link
Copy Markdown
Contributor Author

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

@biaol-odata
biaol-odata merged commit 9b8f541 into OData:master Jun 14, 2018
biaol-odata pushed a commit to biaol-odata/odata.net that referenced this pull request Jun 26, 2018
* Fix a wrong if condition

* Remove count check
biaol-odata pushed a commit that referenced this pull request Jun 26, 2018
* 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants