You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Cergey Chaulin (JIRA)" <ji...@apache.org> on 2017/11/20 21:53:00 UTC

[jira] [Comment Edited] (IGNITE-6745) Java 9: rework usages of URLClassLoader.getURLs()

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

Cergey Chaulin edited comment on IGNITE-6745 at 11/20/17 9:52 PM:
------------------------------------------------------------------

1. The file is present in the patch. I'll add it to the pull request. 
.. Other points will be fixed.

These changes only refer to runtime (running under jdk-9 - to run corresponding "--add-opens" modules should be supplied in command line, probably we need tests for this also). To build under jdk-9 all the issues in IGNITE-6728 should be fixed.


was (Author: cossack5):
1. The file is present in the patch. I'll add it to the pull request. 
.. Other issues will be fixed.

These changes only refer to runtime (running under jdk-9). To build under jdk-9 all the issues in IGNITE-6728 should be fixed. 

> Java 9: rework usages of URLClassLoader.getURLs()
> -------------------------------------------------
>
>                 Key: IGNITE-6745
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6745
>             Project: Ignite
>          Issue Type: Task
>          Components: general
>            Reporter: Vladimir Ozerov
>             Fix For: 2.4
>
>         Attachments: IGNITE-6745.patch
>
>
> We use this method in multiple places:
> 1) {{MessageCodeGenerator}}
> 2) {{BinaryContext}}
> 3) {{ClassesGenerator}}
> 4) {{GridUriDeploymentFileProcessor}}
> The problem is that in Java 9 application class loader is not {{URLClassLoader}}, so we cannot get URLs easily. Instead typically it is {{BuiltinClassLoader}}, which refers to {{URLClassLoader}} in it's internal field {{ucp}}.
> Let's refactor all usages of {{URLClassLoader.getURLs}} to some utility method, which will be able to handle both Java 7/8 and Java 9 (through reflection).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)