<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:40 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-175] Add WriterConcern.valueOf  WAS: Make WriteConcern a Enum</title>
                <link>https://jira.mongodb.org/browse/JAVA-175</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Would be cool if the WriteConcern class was a Java5 Enum. That way, one could pass a string (.valueOf(String)) coming from a config file to it. Shouldn&apos;t affect existing code bases much.&lt;/p&gt;</description>
                <environment></environment>
        <key id="13272">JAVA-175</key>
            <summary>Add WriterConcern.valueOf  WAS: Make WriteConcern a Enum</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="9">Done</resolution>
                                        <assignee username="scotthernandez">Scott Hernandez</assignee>
                                    <reporter username="analytically">Mathias Bogaert</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Oct 2010 12:27:12 +0000</created>
                <updated>Fri, 29 Oct 2010 02:48:53 +0000</updated>
                            <resolved>Tue, 19 Oct 2010 00:38:18 +0000</resolved>
                                    <version>2.1</version>
                                    <fixVersion>2.3</fixVersion>
                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="19430" author="auto" created="Thu, 21 Oct 2010 04:35:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;scotthernandez&apos;, &apos;name&apos;: &apos;Scott Hernandez&apos;, &apos;email&apos;: &apos;scotthernandez@hotmail.com&apos;}
&lt;p&gt;Message: add valueOf for issue &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-175&quot; title=&quot;Add WriterConcern.valueOf  WAS: Make WriteConcern a Enum&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-175&quot;&gt;&lt;del&gt;JAVA-175&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo-java-driver/commit/be09543c0f7da8ef586e0fd392a920557b8d3aea&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo-java-driver/commit/be09543c0f7da8ef586e0fd392a920557b8d3aea&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="19320" author="scotthernandez" created="Tue, 19 Oct 2010 00:38:18 +0000"  >&lt;p&gt;Patch, &lt;a href=&quot;http://github.com/scotthernandez/mongo-java-driver/commit/1557f5723d1b5fff05174177d2bb110e881404f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/scotthernandez/mongo-java-driver/commit/1557f5723d1b5fff05174177d2bb110e881404f3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="19051" author="eliot" created="Sun, 10 Oct 2010 03:13:51 +0000"  >&lt;p&gt;As scott said - this recently went the other way.&lt;/p&gt;

&lt;p&gt;Though adding a way to easily go from String to WriteConcern makes sense&lt;/p&gt;</comment>
                            <comment id="18957" author="scotthernandez" created="Wed, 6 Oct 2010 16:28:50 +0000"  >&lt;p&gt;It used to be an enum, but now since it encompasses many values this makes less sense. We aren&apos;t going to name every combination and that is the problem. We could make it an enum (since an enum is only a class) and name a few predefined options like we have done (currently using statics).&lt;/p&gt;

&lt;p&gt;That unfortunately feels a bit hackish, and could be confusing to some people as it means you would have to use a custom enum constructor (or special static method) to create non-predefined instances of the enum.&lt;/p&gt;

&lt;p&gt;Where do you expect to be able to define something in a config file that would get set in code? Either way you need some kind of converter (and setter) so why not just do it yourself? You can even use the static fields on WriteConcern (via reflection) very easily (or we could write a helper method to do that).&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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrhctr:</customfieldvalue>

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