<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:49:19 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-4771] IsPowerOf2 always return true</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4771</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;The function IsPowerOf2 from the &lt;a href=&quot;#L29&quot; title=&quot;https://github.com/mongodb/mongo-csharp-driver/blob/v2.21.0/src/MongoDB.Bson/PowerOf2.cs#L29]&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;PowerOf2.cs&lt;/a&gt; file in Bson project always return true :&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;em&gt;1 &amp;amp; 0 = 0&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;&lt;em&gt;0 &amp;amp; 1 = 0&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name=&quot;SimpleFix%3A&quot;&gt;&lt;/a&gt;Simple Fix:&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;```cs&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# Replace&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;var result = (n &amp;amp; (n - 1)) == 0;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;# By&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;var result = n % 2 == 0;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;```&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2425337">CSHARP-4771</key>
            <summary>IsPowerOf2 always return true</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13202">Works as Designed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="melvin.courjaud@e-i.com">Melvin Courjaud</reporter>
                        <labels>
                            <label>bug</label>
                    </labels>
                <created>Thu, 24 Aug 2023 13:28:02 +0000</created>
                <updated>Fri, 27 Oct 2023 13:24:36 +0000</updated>
                            <resolved>Thu, 31 Aug 2023 16:17:47 +0000</resolved>
                                    <version>2.21.0</version>
                                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5672473" author="james.kovacs" created="Thu, 31 Aug 2023 16:17:31 +0000"  >&lt;p&gt;Thank you for getting back to us. I will close as Works As Designed.&lt;/p&gt;</comment>
                            <comment id="5671233" author="JIRAUSER1274817" created="Thu, 31 Aug 2023 08:54:24 +0000"  >&lt;p&gt;I apologize, I&apos;ve mistested the function.&lt;/p&gt;

&lt;p&gt;It works correctly.&lt;/p&gt;</comment>
                            <comment id="5656188" author="JIRAUSER1274817" created="Thu, 24 Aug 2023 13:32:05 +0000"  >&lt;p&gt;Sorry for the dead link in description, see &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/blob/v2.21.0/src/MongoDB.Bson/PowerOf2.cs#L29&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/blob/v2.21.0/src/MongoDB.Bson/PowerOf2.cs#L29&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="5656173" author="dbeng-pm-bot" created="Thu, 24 Aug 2023 13:28:05 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=melvin.courjaud%40e-i.com&quot; class=&quot;user-hover&quot; rel=&quot;melvin.courjaud@e-i.com&quot;&gt;melvin.courjaud@e-i.com&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i25ocw:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>