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

ASF GitHub Bot commented on IGNITE-8146:
----------------------------------------

GitHub user tledkov-gridgain opened a pull request:

    https://github.com/apache/ignite/pull/4826

    IGNITE-8146: JDK9: fix gathering class loader's URLs

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-8146

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/4826.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4826
    
----
commit 8424d7c66972985dbfea57943c97bc77b4d12f30
Author: tledkov-gridgain <tledkov@...>
Date:   2018-09-25T13:10:17Z

    IGNITE-8146: JDK9: fix gathering class loader's URLs

----


> 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)

Reply via email to