[jira] [Commented] (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=16305440#comment-16305440 ] Andrey Gura commented on IGNITE-6745: - This issue is critical for release 2.4. So I've implemented and tested fix. Merged to master branch. > 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 >Affects Versions: 2.3 >Reporter: Vladimir Ozerov >Assignee: Cergey Chaulin > 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)
[jira] [Commented] (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=16259890#comment-16259890 ] Cergey Chaulin commented on IGNITE-6745: 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)
[jira] [Commented] (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=16259051#comment-16259051 ] Evgenii Zhuravlev commented on IGNITE-6745: --- [~cossack5], I have a couple of comments for this PR: 1. I don't see Java9Bridge in this pull request, could you please add it? 2. Please check coding guidelines here: https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines. Several imports from the same package shouldn't be replaced with import package.*. 3. When you remove a field, please remove the whole string and comment for it(i.e. ClassesGenerator.java 74). 4. Imports should be in alphabetical order. 5. Redundant empty lines(i.e. IgniteCompatibilityAbstractTest.java 174) Also, how do you resolve a problem with building Ignite with both java7-8 and java9? I think here should be some changes with maven, but I don't see it. Thanks, Evgenii > 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)
[jira] [Commented] (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=16234985#comment-16234985 ] ASF GitHub Bot commented on IGNITE-6745: GitHub user elcergey opened a pull request: https://github.com/apache/ignite/pull/2970 IGNITE-6745: Java 9: rework usages of URLClassLoader.getURLs() Regarding the https://issues.apache.org/jira/browse/IGNITE-6745 You can merge this pull request into a Git repository by running: $ git pull https://github.com/elcergey/ignite master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/2970.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 #2970 commit 31aae683b37c4feeddaba3100e46526e3d1f019d Author: cossa...@mail.ruDate: 2017-11-01T23:51:04Z IGNITE-6745: Java 9: rework usages of URLClassLoader.getURLs() > Java 9: rework usages of URLClassLoader.getURLs() > - > > Key: IGNITE-6745 > URL: https://issues.apache.org/jira/browse/IGNITE-6745 > Project: Ignite > Issue Type: Task > Security Level: Public(Viewable by anyone) > Components: general >Reporter: Vladimir Ozerov >Priority: Major > 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)