<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58:15 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-2860] Decimal128 should extend Number and implement Comparable</title>
                <link>https://jira.mongodb.org/browse/JAVA-2860</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;It would be beneficial if Decimal128 would extend the standard Java interface Number (as all numbers and BigDecimal do). This would improve compatibility with many libraries that are Decimal128 unaware, but are able to process numbers.&lt;/p&gt;

&lt;p&gt;Update: Also consider implementing Comparable&lt;/p&gt;</description>
                <environment></environment>
        <key id="545168">JAVA-2860</key>
            <summary>Decimal128 should extend Number and implement Comparable</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="MatejTymes">Matej Tymes [X]</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 May 2018 23:18:44 +0000</created>
                <updated>Sat, 28 Oct 2023 11:22:50 +0000</updated>
                            <resolved>Thu, 6 Dec 2018 12:27:48 +0000</resolved>
                                                    <fixVersion>3.10.0</fixVersion>
                                    <component>BSON</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2113568" author="xgen-internal-githook" created="Mon, 14 Jan 2019 01:18:15 +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: Rewrite Decimal128 Groovy/Spock tests as Java&lt;/p&gt;

&lt;p&gt;Groovy does surprising things with numbers under the hood, especially for&lt;br/&gt;
classes that extend Number and/or implement Comparable, which Decimal128&lt;br/&gt;
now does.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/a88f98399c0a157d4a269a9bc01c49ebd1958434&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a88f98399c0a157d4a269a9bc01c49ebd1958434&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2113567" author="xgen-internal-githook" created="Mon, 14 Jan 2019 01:18:13 +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: Decimal128 implements Comparable&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/62758dbd1555014e695775ffcf5af3ff23fd94bb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/62758dbd1555014e695775ffcf5af3ff23fd94bb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2113566" author="xgen-internal-githook" created="Mon, 14 Jan 2019 01:18:11 +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: Handle negative zero properly in Decimal128.doubleValue&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/d8765b8a9a4e96d61d74a1043b6d546d815eb19c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/d8765b8a9a4e96d61d74a1043b6d546d815eb19c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2113558" author="xgen-internal-githook" created="Mon, 14 Jan 2019 01:17:50 +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: Handle Decimal128 values when decoding integral and decimal types&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/79cd393ae39c1239eb279dc721add3f716c2e9b2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/79cd393ae39c1239eb279dc721add3f716c2e9b2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2113557" author="xgen-internal-githook" created="Mon, 14 Jan 2019 01:17: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: Fix BasicBsonEncoder to still encode Decimal128 correctly&lt;/p&gt;

&lt;p&gt;Since Decimal128 now extends Number, BasicBsonEncoder checks if value&lt;br/&gt;
is Decimal128 before it checks if it&apos;s a Number. Otherwise it won&apos;t be&lt;br/&gt;
encoded correctly&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/409df6fadb90a7e033711412481161219d3653af&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/409df6fadb90a7e033711412481161219d3653af&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2113556" author="xgen-internal-githook" created="Mon, 14 Jan 2019 01:17:46 +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: org.bson.Decimal128 implements java.lang.Number&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/c827ed29440a43b4d5f353fb0ec3c4626afc2d06&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/c827ed29440a43b4d5f353fb0ec3c4626afc2d06&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2082527" author="xgen-internal-githook" created="Thu, 6 Dec 2018 12:27:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Rewrite Decimal128 Groovy/Spock tests as Java&lt;/p&gt;

&lt;p&gt;Groovy does surprising things with numbers under the hood, especially for&lt;br/&gt;
classes that extend Number and/or implement Comparable, which Decimal128&lt;br/&gt;
now does.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/ddb26f4f8a47806d98f437593a1ed5b47d8b5b0e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/ddb26f4f8a47806d98f437593a1ed5b47d8b5b0e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2082526" author="xgen-internal-githook" created="Thu, 6 Dec 2018 12:27:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Decimal128 implements Comparable&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/6e75cf63e20c73b921a4de08bce87e0eec9b82c0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/6e75cf63e20c73b921a4de08bce87e0eec9b82c0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2082525" author="xgen-internal-githook" created="Thu, 6 Dec 2018 12:27:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Handle negative zero properly in Decimal128.doubleValue&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/45d65c9ee780f84a16a32321e32dd3cbad3cf3a4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/45d65c9ee780f84a16a32321e32dd3cbad3cf3a4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2080030" author="jeff.yemin" created="Tue, 4 Dec 2018 17:11:25 +0000"  >&lt;p&gt;Re-opening to implement Comparable as well.&lt;/p&gt;</comment>
                            <comment id="2079920" author="xgen-internal-githook" created="Tue, 4 Dec 2018 16:13:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Handle Decimal128 values when decoding integral and decimal types&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/5908eb3adb3e6901d7e0e7cfe2b583fe80310aef&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/5908eb3adb3e6901d7e0e7cfe2b583fe80310aef&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2079919" author="xgen-internal-githook" created="Tue, 4 Dec 2018 16:12:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Fix BasicBsonEncoder to still encode Decimal128 correctly&lt;/p&gt;

&lt;p&gt;Since Decimal128 now extends Number, BasicBsonEncoder checks if value&lt;br/&gt;
is Decimal128 before it checks if it&apos;s a Number. Otherwise it won&apos;t be&lt;br/&gt;
encoded correctly&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/b8334aea33ae67070c672d592490e4bfd8cf39fc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/b8334aea33ae67070c672d592490e4bfd8cf39fc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2079918" author="xgen-internal-githook" created="Tue, 4 Dec 2018 16:12:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: org.bson.Decimal128 implements java.lang.Number&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2860&quot; title=&quot;Decimal128 should extend Number and implement Comparable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2860&quot;&gt;&lt;del&gt;JAVA-2860&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/17789f2f9dc1fc224737678aab262bce77072205&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/17789f2f9dc1fc224737678aab262bce77072205&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1893503" author="jeff.yemin" created="Wed, 16 May 2018 23:24:35 +0000"  >&lt;p&gt;Thanks for the suggestion.&#160; As a workaround for anyone looking at this ticket, you can already call Decimal128#bigDecimalValue to get the Decimal128 as a BigDecimal, which, as the reporter notes, already implements Number.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="621307">JAVA-3056</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></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|hu3qvb:</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>