ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taras Ledkov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-8146) JDK9: IgniteUtils classLoaderUrls() JDK9 bug
Date Wed, 26 Sep 2018 08:41:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-8146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628427#comment-16628427
] 

Taras Ledkov commented on IGNITE-8146:
--------------------------------------

[~vozerov], please take a look at the patch.
Tests results on JDK8 is OK.

> JDK9: IgniteUtils classLoaderUrls() JDK9 bug
> --------------------------------------------
>
>                 Key: IGNITE-8146
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8146
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 2.4
>            Reporter: Sujit Kumar Mahapatra
>            Assignee: Taras Ledkov
>            Priority: Trivial
>              Labels: jdk9
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Reporting a probable miss that breaks JDK9 compatibility.
> As part of [this commit|https://github.com/apache/ignite/commit/ee2a6f7c3f2e3c9bd8dc61c8dbdf171e933d9481#diff-309ab4ef2fc61d6b2570d390acfb9bd6]  in [ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52]/modules/core/src/main/java/org/apache/ignite/internal/util/*IgniteUtils.java,* below
lines will throw *ClassCastException* in JDK9 during runtime.
> _return ((URLClassLoader)urlClsLdrField.get(clsLdr)).getURLs();_
>  
> Here, _urlClsLdrField.get(clsLdr)_ return an object of type "___java.base/jdk.internal.loader.URLClassPath_"
which can't be cast to "_URLClassLoader"._
>  
> The fix seems to be to introduce another reflection call to invoke _getURLs_  method
of the internal _URLClassPath_ class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message