<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:02:38 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-4656] getJavaMajorVersion() fails with version tag 18-ea</title>
                <link>https://jira.mongodb.org/browse/JAVA-4656</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;h4&gt;&lt;a name=&quot;Usingthefirstreleaseofjava18%2Citidentifiesitselfasversion18ea.ThiscreatesaprobleminthemethodgetJavaMajorVersionwhereisnotsupported.Thisthencreatesanumberexception.&quot;&gt;&lt;/a&gt;Using the first release of java 18, it identifies itself as version 18-ea. This creates a problem in the method getJavaMajorVersion where - is not supported. This then creates a number exception.&lt;/h4&gt;

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

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/internal/connection/tlschannel/util/Util.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/internal/connection/tlschannel/util/Util.java&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&#160;public static int getJavaMajorVersion() {&lt;br/&gt;
&#160; &#160; String version = System.getProperty(&quot;java.version&quot;);&lt;br/&gt;
&#160; &#160; if (version.startsWith(&quot;1.&quot;)) &lt;/p&gt;
{
&#160; &#160; &#160; version = version.substring(2, 3);
&#160; &#160; }
&lt;p&gt; else {&lt;br/&gt;
&#160; &#160; &#160; int dot = version.indexOf(&quot;.&quot;);&lt;br/&gt;
&#160; &#160; &#160; if (dot != -1) &lt;/p&gt;
{
&#160; &#160; &#160; &#160; version = version.substring(0, dot);
&#160; &#160; &#160; }
&lt;p&gt;&#160; &#160; }&lt;br/&gt;
&#160; &#160; return Integer.parseInt(version);&lt;br/&gt;
&#160; }&lt;/p&gt;

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

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

&lt;p&gt;Exception:&lt;/p&gt;

&lt;p&gt;&#160;&lt;br/&gt;
com.mongodb.MongoInternalException: Opening the TlsChannelStream failed&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
33&lt;br/&gt;
at com.mongodb.internal.connection.AsynchronousChannelStream$FutureAsyncCompletionHandler.get(AsynchronousChannelStream.java:328) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
32&lt;br/&gt;
at com.mongodb.internal.connection.AsynchronousChannelStream$FutureAsyncCompletionHandler.getOpen(AsynchronousChannelStream.java:304) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
31&lt;br/&gt;
at com.mongodb.internal.connection.AsynchronousChannelStream.open(AsynchronousChannelStream.java:125) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
30&lt;br/&gt;
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:180) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
29&lt;br/&gt;
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:188) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
28&lt;br/&gt;
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:152) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
27&lt;br/&gt;
at java.base/java.lang.Thread.run(Thread.java:833) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
26&lt;br/&gt;
Caused by: java.lang.ExceptionInInitializerError: null&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
25&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.TlsChannelBuilder.&amp;lt;init&amp;gt;(TlsChannelBuilder.java:37) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
24&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.ClientTlsChannel$Builder.&amp;lt;init&amp;gt;(ClientTlsChannel.java:45) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
23&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.ClientTlsChannel$Builder.&amp;lt;init&amp;gt;(ClientTlsChannel.java:40) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
22&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.ClientTlsChannel.newBuilder(ClientTlsChannel.java:87) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
21&lt;br/&gt;
at com.mongodb.connection.TlsChannelStreamFactoryFactory$TlsChannelStream.lambda$openAsync$0(TlsChannelStreamFactoryFactory.java:236) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
20&lt;br/&gt;
at com.mongodb.connection.TlsChannelStreamFactoryFactory$SelectorMonitor.lambda$start$0(TlsChannelStreamFactoryFactory.java:141) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
19&lt;br/&gt;
... 1 common frames omitted&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
18&lt;br/&gt;
Caused by: java.lang.NumberFormatException: For input string: &quot;18-ea&quot;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
17&lt;br/&gt;
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
16&lt;br/&gt;
at java.base/java.lang.Integer.parseInt(Integer.java:668) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
15&lt;br/&gt;
at java.base/java.lang.Integer.parseInt(Integer.java:784) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
14&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.util.Util.getJavaMajorVersion(Util.java:56) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
13&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.util.DirectBufferDeallocator.&amp;lt;init&amp;gt;(DirectBufferDeallocator.java:109) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
12&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.DirectBufferAllocator.&amp;lt;init&amp;gt;(DirectBufferAllocator.java:37) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
11&lt;br/&gt;
at com.mongodb.internal.connection.tlschannel.TlsChannel.&amp;lt;clinit&amp;gt;(TlsChannel.java:70) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-driver-core-4.4.2.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
10&lt;br/&gt;
... 7 common frames omitted&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Using java with the latest&lt;/em&gt;&#160; openjdk:18-alpine docker image.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Please provide any additional background information that may be helpful in diagnosing the bug.&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2073163">JAVA-4656</key>
            <summary>getJavaMajorVersion() fails with version tag 18-ea</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="valentin.kovalenko@mongodb.com">Valentin Kavalenka</assignee>
                                    <reporter username="magnus@apperiet.no">Magnus Sulland</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Jun 2022 13:39:32 +0000</created>
                <updated>Sat, 28 Oct 2023 11:20:40 +0000</updated>
                            <resolved>Thu, 23 Jun 2022 16:29:25 +0000</resolved>
                                                    <fixVersion>4.7.1</fixVersion>
                                    <component>Connection Management</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4635738" author="JIRAUSER1258163" created="Thu, 23 Jun 2022 16:28:54 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=magnus%40apperiet.no&quot; class=&quot;user-hover&quot; rel=&quot;magnus@apperiet.no&quot;&gt;magnus@apperiet.no&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for taking time to report the bug. The fix will be released in 4.6.2.&lt;/p&gt;</comment>
                            <comment id="4635715" author="xgen-internal-githook" created="Thu, 23 Jun 2022 16:21:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Valentin Kovalenko&apos;, &apos;email&apos;: &apos;valentin.kovalenko@mongodb.com&apos;, &apos;username&apos;: &apos;stIncMale&apos;}
&lt;p&gt;Message: Fix `tlschannel.util.Util.getJavaMajorVersion` (#969)&lt;/p&gt;

&lt;p&gt;This is a combination of a manual cherry-pick and squash of the following commits:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/marianobarrios/tls-channel/commit/3b5f8a0bb592dd918b6641d771fc83d9a5c3d1ca&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/marianobarrios/tls-channel/commit/3b5f8a0bb592dd918b6641d771fc83d9a5c3d1ca&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/marianobarrios/tls-channel/commit/f4b780e10c42c8a49e39f92d43fcb0179131124d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/marianobarrios/tls-channel/commit/f4b780e10c42c8a49e39f92d43fcb0179131124d&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;and a small fix on top of that.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-4656&quot; title=&quot;getJavaMajorVersion() fails with version tag 18-ea&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-4656&quot;&gt;&lt;del&gt;JAVA-4656&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: 4.6.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/795ddcf41babd1839ba4b399273713ecaf215205&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/795ddcf41babd1839ba4b399273713ecaf215205&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4635529" author="xgen-internal-githook" created="Thu, 23 Jun 2022 15:36:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Valentin Kovalenko&apos;, &apos;email&apos;: &apos;valentin.kovalenko@mongodb.com&apos;, &apos;username&apos;: &apos;stIncMale&apos;}
&lt;p&gt;Message: Fix `tlschannel.util.Util.getJavaMajorVersion` (#969)&lt;/p&gt;

&lt;p&gt;This is a combination of a manual cherry-pick and squash of the following commits:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/marianobarrios/tls-channel/commit/3b5f8a0bb592dd918b6641d771fc83d9a5c3d1ca&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/marianobarrios/tls-channel/commit/3b5f8a0bb592dd918b6641d771fc83d9a5c3d1ca&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/marianobarrios/tls-channel/commit/f4b780e10c42c8a49e39f92d43fcb0179131124d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/marianobarrios/tls-channel/commit/f4b780e10c42c8a49e39f92d43fcb0179131124d&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;and a small fix on top of that.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-4656&quot; title=&quot;getJavaMajorVersion() fails with version tag 18-ea&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-4656&quot;&gt;&lt;del&gt;JAVA-4656&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/1375eee07cd0d99745feba62dd329e1abaf418bf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/1375eee07cd0d99745feba62dd329e1abaf418bf&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

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