<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:09 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-2417] Add uset a mark and multiple marks in BSONReader</title>
                <link>https://jira.mongodb.org/browse/JAVA-2417</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;It would be great if a mark set on a org.bson.BsonReader could be unset. Right now only resetiing to the mark(ed) position is possible.&lt;/p&gt;

&lt;p&gt;My use case(s):&lt;/p&gt;

&lt;p&gt;I wrote a reflection based org.bson.codecs.Codec that uses the new MongoDB java driver. Within the mongo database any inserted entity holds a field with the type (or name or...) of the correct Java-Pojo this entity maps to. When reading entities from the mongo I first need to read that type-property, then I create the java-Pojo instance and then I reset the mark to re-read all remaining fields into the newly created Java-instance. I am aware of the fact that I could have used the DocumentCodec provided by the mongo driver for that purpose but this would imply double conversion hence double work hence less performance.&lt;/p&gt;

&lt;p&gt;Now, in most cases the first field read IS actually the type and I do not reset the mark. In this case I would like to unset the mark.&lt;/p&gt;

&lt;p&gt;While decoding any decoder may internally mark the reader itself in order to apply logic as described above. Unfortunately the BsonReader is not capable of setting more than one mark at a time.&lt;/p&gt;

&lt;p&gt;My desired behaviour would be: Any mark set can be reset and unset. All marks could be put on a stack?!&lt;/p&gt;

&lt;p&gt;The main issue here is, that I cannot be sure that I don&#8217;t know if the nested decoder uses mark itself.&lt;/p&gt;</description>
                <environment></environment>
        <key id="340605">JAVA-2417</key>
            <summary>Add uset a mark and multiple marks in BSONReader</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="roy.rim@mongodb.com">Roy Rim</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2016 15:31:28 +0000</created>
                <updated>Thu, 22 Dec 2016 15:47:00 +0000</updated>
                            <resolved>Thu, 22 Dec 2016 15:47:00 +0000</resolved>
                                                                    <component>BSON</component>
                    <component>Codecs</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1464056" author="jeff.yemin" created="Thu, 22 Dec 2016 15:47:00 +0000"  >&lt;p&gt;This duplicates &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2416&quot; title=&quot;BSONReader mark - add support to unset a mark (in contrast to resetting), and add support for multiple marks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2416&quot;&gt;&lt;del&gt;JAVA-2416&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="340587">JAVA-2416</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hst4pb:</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>