<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58:28 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>[JAVA-2961] Get ObjectId from bytes not throwing exception if bytes.length &gt; 12</title>
                <link>https://jira.mongodb.org/browse/JAVA-2961</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description></description>
                <environment></environment>
        <key id="599628">JAVA-2961</key>
            <summary>Get ObjectId from bytes not throwing exception if bytes.length &gt; 12</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="13201">Fixed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="umang">Umang Jalan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Sep 2018 10:21:28 +0000</created>
                <updated>Sat, 28 Oct 2023 11:22:43 +0000</updated>
                            <resolved>Tue, 8 Jan 2019 13:22:09 +0000</resolved>
                                                    <fixVersion>3.10.0</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2113581" author="xgen-internal-githook" created="Mon, 14 Jan 2019 01:18:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;jyemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;name&apos;: &apos;Jeff Yemin&apos;}
&lt;p&gt;Message: Conform to ObjectId(byte[] bytes) contract&lt;/p&gt;

&lt;p&gt;The Javadoc states that it throws IllegalArgumentException if array is&lt;br/&gt;
null or not of length 12. The implementation now conforms to that&lt;br/&gt;
contract and throws the specified exception the byte array is not of&lt;br/&gt;
length 12.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2961&quot; title=&quot;Get ObjectId from bytes not throwing exception if bytes.length &amp;gt; 12&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2961&quot;&gt;&lt;del&gt;JAVA-2961&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: 3.10.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/468bcb95a3d1904c2033a52453476b56b94d9bff&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/468bcb95a3d1904c2033a52453476b56b94d9bff&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2108433" author="xgen-internal-githook" created="Tue, 8 Jan 2019 13:21:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;jyemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;name&apos;: &apos;Jeff Yemin&apos;}
&lt;p&gt;Message: Conform to ObjectId(byte[] bytes) contract&lt;/p&gt;

&lt;p&gt;The Javadoc states that it throws IllegalArgumentException if array is&lt;br/&gt;
null or not of length 12. The implementation now conforms to that&lt;br/&gt;
contract and throws the specified exception the byte array is not of&lt;br/&gt;
length 12.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2961&quot; title=&quot;Get ObjectId from bytes not throwing exception if bytes.length &amp;gt; 12&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2961&quot;&gt;&lt;del&gt;JAVA-2961&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/911470a80c2e408db70b5db88bffc0393b937f29&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/911470a80c2e408db70b5db88bffc0393b937f29&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1993596" author="umang" created="Wed, 5 Sep 2018 12:03:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt; I think its already broken and it needs to be fixed.&lt;/p&gt;

&lt;p&gt;Everyone refers to java doc before integration to get the expected output. So I am assuming whoever is using it is actually is getting wrong output than expected as was in my case.&lt;/p&gt;

&lt;p&gt;Whenever this change was made , it was not communicated in change log either about the new behaviour. So if someone is relying on current behavior , I believe thats the wrong expectation and its need to be notified.&lt;/p&gt;</comment>
                            <comment id="1993586" author="jeff.yemin" created="Wed, 5 Sep 2018 11:40:48 +0000"  >&lt;p&gt;I&apos;m not convinced that this change should be made.  Although it would make the implementation match the Javadoc description of the &lt;tt&gt;bytes&lt;/tt&gt; parameter, it would break existing applications relying on the current behavior, which is consistent with the behavior and documentation of the constructor that takes a &lt;tt&gt;ByteBuffer&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=umang&quot; class=&quot;user-hover&quot; rel=&quot;umang&quot;&gt;umang&lt;/a&gt; can you present a counter-argument? &lt;/p&gt;</comment>
                            <comment id="1993573" author="umang" created="Wed, 5 Sep 2018 11:16:02 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/484&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/484&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr7n1j:</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>