<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:33:46 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>[GODRIVER-212] BSON Library Decoder Panics And Cannot Cast Numbers</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-212</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The two main bugs:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The decoder can&apos;t properly decode an int32 into a struct field that&apos;s an int64. As long as the values fit, we should be able to freely put int32&apos;s, int64&apos;s, and doubles into the other number types.&lt;/li&gt;
	&lt;li&gt;The decoder cannot handle decoding into a slice when it is a field of a struct. I didn&apos;t check for maps, but from the code it looks like whenever a BSON Array is returned and we try to decode it into an array or a slice we panic.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Additionally, the unit test coverage is sparse. One idea to boost the unit test coverage would be to ensure that we support roundtripping: If a user gives us a struct to encode, we should be able to encode it and then decode back into the same type and the values should be the same. Writing test that cover the happy path for the getReflectValue method would also boost coverage.&lt;/p&gt;

&lt;p&gt;For the slice case, it is okay to create a new slice of the correct length and assign it to the field, if users want to control their allocs they can handle unmarshaling in custom code.&lt;/p&gt;</description>
                <environment></environment>
        <key id="489979">GODRIVER-212</key>
            <summary>BSON Library Decoder Panics And Cannot Cast Numbers</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="sam.rossi@mongodb.com">Samuel Rossi</assignee>
                                    <reporter username="kris.brandow@mongodb.com">Kristofer Brandow</reporter>
                        <labels>
                    </labels>
                <created>Wed, 31 Jan 2018 00:55:46 +0000</created>
                <updated>Sat, 28 Oct 2023 11:39:49 +0000</updated>
                            <resolved>Thu, 1 Feb 2018 19:13:45 +0000</resolved>
                                                    <fixVersion>0.0.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>GODRIVER-131</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htgqkv:</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>