<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:04:12 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-5287] Regression (4.9.x to 4.11.x) lack of generic support in Maps</title>
                <link>https://jira.mongodb.org/browse/JAVA-5287</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;4.9.x versions of the Java driver would handle this scenario gracefully:&lt;/p&gt;

&lt;p&gt;A class with a property like:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;public Map&amp;lt;String, MyGenericType&amp;lt;Animal&amp;gt;&amp;gt; decorators;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;where &lt;tt&gt;Animal&lt;/tt&gt; is an abstract class with a discriminator.&lt;/p&gt;

&lt;p&gt;Such a field in a class now produces:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;CodecConfigurationException&lt;/em&gt; with the message: &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; &lt;em&gt;contains generic types that have not been specialised. Top level classes with generic types are not supported by the PojoCodec.&lt;/em&gt;&quot;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;

&lt;p&gt;Version 4.11.x of the Java driver produces the error.&#160; Version 4.9.x of the driver works fine.&lt;/p&gt;

&lt;p&gt;This is also affecting a widely used Java library, Quarkus: &lt;a href=&quot;https://github.com/quarkusio/quarkus/issues/36397&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/quarkusio/quarkus/issues/36397&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2538227">JAVA-5287</key>
            <summary>Regression (4.9.x to 4.11.x) lack of generic support in Maps</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="11156" iconUrl="https://jira.mongodb.org/images/icons/statuses/generic.png" description="">Waiting for Reporter</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="robert@unitydynamics.com">Robert Fox</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Jan 2024 16:20:44 +0000</created>
                <updated>Sun, 4 Feb 2024 08:57:20 +0000</updated>
                                            <version>4.11.0</version>
                    <version>4.11.1</version>
                    <version>4.11.2</version>
                                                                        <votes>1</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="6065451" author="JIRAUSER1277020" created="Sun, 4 Feb 2024 08:57:20 +0000"  >&lt;p&gt;I do have, but extracting separate examples from the full infra we built is a bit complicated.&lt;/p&gt;

&lt;p&gt;I will do it if there is no other candidate, but it will take some time...&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="6047719" author="jeff.yemin" created="Sun, 28 Jan 2024 21:50:03 +0000"  >&lt;p&gt;If anyone has a reproduction of this issue that is independent of Quarkus, we&apos;d love to see it.&lt;/p&gt;</comment>
                            <comment id="6047428" author="JIRAUSER1277020" created="Sun, 28 Jan 2024 11:17:36 +0000"  >&lt;p&gt;Hi, we have the same issue.&#160;&lt;/p&gt;

&lt;p&gt;Is there any progress on it?&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                            <comment id="5996143" author="robert@unitydynamics.com" created="Tue, 9 Jan 2024 03:59:18 +0000"  >&lt;p&gt;Got it&#8211;will provide both reproductions.&#160; But it will have to wait about a week!&lt;/p&gt;</comment>
                            <comment id="5994610" author="JIRAUSER1268808" created="Mon, 8 Jan 2024 17:35:31 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert%40unitydynamics.com&quot; class=&quot;user-hover&quot; rel=&quot;robert@unitydynamics.com&quot;&gt;robert@unitydynamics.com&lt;/a&gt;, this second issue with DecoratorBase sounds like it can be a second ticket. If you can file an additional ticket for this behavior (with a repro) we will look into it. &lt;/p&gt;

&lt;p&gt;If you could also add the repro for this ticket as well, we can investigate this one too.&lt;/p&gt;

&lt;p&gt;Thanks Robert!&lt;/p&gt;</comment>
                            <comment id="5992749" author="robert@unitydynamics.com" created="Mon, 8 Jan 2024 02:12:26 +0000"  >&lt;p&gt;Thanks Ross.&#160; As I was creating a reproduction example I noticed it&apos;s very much an edge case that we can work around.&#160; Our new strategy is to use a non-generic abstract base class in our maps:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;public Map&amp;lt;String, DecoratorBase&amp;gt; decorators;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;and then make a generic class underneath:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;public abstract class DecoratorBase { };&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;public class Decorator&amp;lt;? extends Animal&amp;gt; extends DecoratorBase&lt;/tt&gt; ...&lt;/p&gt;

&lt;p&gt;The problem we run into now is that when you register the package with all of the classes in it, DecoratorBase is not found (presumably because map value classes are not scanned when ordering classes for registration?)&lt;/p&gt;

&lt;p&gt;If we explicitly register DecoratorBase, then the code works as expected.&#160; Because the issue is slightly different for us now should we close this issue or rename it?&#160; I don&apos;t mind opening a new ticket.&#160; Thanks again, -Robert&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="5989318" author="ross@10gen.com" created="Fri, 5 Jan 2024 16:40:55 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert%40unitydynamics.com&quot; class=&quot;user-hover&quot; rel=&quot;robert@unitydynamics.com&quot;&gt;robert@unitydynamics.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Many thanks for the ticket.  Could you provide more detail on the bug?  Either a full stacktrace or a test case to reproduce the error.  Ideally, a &lt;a href=&quot;https://stackoverflow.com/help/minimal-reproducible-example&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;minimal reproducible example&lt;/a&gt; would help as I could replicate the bug and use it as a test case for the fix.&lt;/p&gt;

&lt;p&gt;All the best,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="5989233" author="dbeng-pm-bot" created="Fri, 5 Jan 2024 16:20:47 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert%40unitydynamics.com&quot; class=&quot;user-hover&quot; rel=&quot;robert@unitydynamics.com&quot;&gt;robert@unitydynamics.com&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2448718">JAVA-5173</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                        <customfield id="customfield_23812" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Assigned Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26447"><![CDATA[Java Drivers]]></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|i2onjw:</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>