<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:03:22 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-4950] Consider whether it&apos;s safe to inherit from kotlinx.coroutines.flow.Flow</title>
                <link>https://jira.mongodb.org/browse/JAVA-4950</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The &lt;tt&gt;kotlinx.coroutines.flow.Flow&lt;/tt&gt; documentation states&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
	&lt;li&gt;### Not stable for inheritance&lt;br/&gt;
 *&lt;/li&gt;
	&lt;li&gt;*&lt;b&gt;The `Flow` interface is not stable for inheritance in 3rd party libraries&lt;/b&gt;*, as new methods&lt;/li&gt;
	&lt;li&gt;might be added to this interface in the future, but is stable for use.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Consider whether it&apos;s safe for the Kotlin driver to inherit from it, as it does now, e.g.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;public class AggregateFlow&amp;lt;T : Any&amp;gt;(private val wrapped: AggregatePublisher&amp;lt;T&amp;gt;) : Flow&amp;lt;T&amp;gt; {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
</description>
                <environment></environment>
        <key id="2325937">JAVA-4950</key>
            <summary>Consider whether it&apos;s safe to inherit from kotlinx.coroutines.flow.Flow</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Apr 2023 14:25:38 +0000</created>
                <updated>Sat, 28 Oct 2023 11:20:26 +0000</updated>
                            <resolved>Tue, 13 Jun 2023 08:32:11 +0000</resolved>
                                                    <fixVersion>4.10.0</fixVersion>
                                    <component>Kotlin</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5494332" author="xgen-internal-githook" created="Tue, 13 Jun 2023 08:04:06 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Ross Lawley&apos;, &apos;email&apos;: &apos;ross@mongodb.com&apos;, &apos;username&apos;: &apos;rozza&apos;}
&lt;p&gt;Message: Kotlin coroutine update. (#1135)&lt;/p&gt;

&lt;p&gt;As the Flow interface is not stable for inheritance in 3rd party libraries,&lt;br/&gt;
use delegation instead.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-4950&quot; title=&quot;Consider whether it&amp;#39;s safe to inherit from kotlinx.coroutines.flow.Flow&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-4950&quot;&gt;&lt;del&gt;JAVA-4950&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/019d7374f7ba4a4def1a3783437bed5a38f533fc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/019d7374f7ba4a4def1a3783437bed5a38f533fc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5400864" author="JIRAUSER1268547" created="Thu, 4 May 2023 14:42:59 +0000"  >&lt;p&gt;An update from Julien:&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;I agree that Flow should not be used directly as mentioned in the doc.The doc says it should not be used &quot;as new methods might be added to this interface in the future&quot;So a workaround would be to use AbstractFlow (&lt;a href=&quot;https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-abstract-flow/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-abstract-flow/&lt;/a&gt;) instead of Flow. We can also add a MongoAbstractFlow that would allow&#160; the driver to add additional methods if AbstractFlow is not updated by the coroutine lib (which is unlikely).An other option would be to use kotlin delegation:&lt;br/&gt;
class AggregateFlow&amp;lt;T : Any&amp;gt;(private val wrapped: AggregatePublisher&amp;lt;T&amp;gt;) : Flow&amp;lt;T&amp;gt; by wrapped.asFlow()&lt;br/&gt;
Then you have no risk anymore.The second option is more elegant I would say. I don&apos;t see at this time any issue with the delegation solution.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr1d6y:</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>