[
https://issues.apache.org/jira/browse/IGNITE-8146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sujit Kumar Mahapatra updated IGNITE-8146:
------------------------------------------
Description:
Reporting a probable miss that breaks JDK9 compatibility.
As part of [this
commit|https://github.com/apache/ignite/commit/ee2a6f7c3f2e3c9bd8dc61c8dbdf171e933d9481#diff-309ab4ef2fc61d6b2570d390acfb9bd6]
[this
commit|https://github.com/apache/ignite/commit/ee2a6f7c3f2e3c9bd8dc61c8dbdf171e933d9481#diff-309ab4ef2fc61d6b2570d390acfb9bd6]
in
[ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52]/[modules|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules]/[core|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core]/[src|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src]/[main|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main]/[java|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java]/[org|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org]/[apache|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache]/[ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache/ignite]/[internal|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache/ignite/internal]/[util|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.
was:
Reporting a probable miss that breaks JDK9 compatibility.
As part of [this
commit|https://github.com/apache/ignite/commit/ee2a6f7c3f2e3c9bd8dc61c8dbdf171e933d9481#diff-309ab4ef2fc61d6b2570d390acfb9bd6]
[this
commit|https://github.com/apache/ignite/commit/ee2a6f7c3f2e3c9bd8dc61c8dbdf171e933d9481#diff-309ab4ef2fc61d6b2570d390acfb9bd6]
in
[ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52]/[modules|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules]/[core|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core]/[src|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src]/[main|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main]/[java|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java]/[org|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org]/[apache|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache]/[ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache/ignite]/[internal|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache/ignite/internal]/[util|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.
> 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
> 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]
> [this
> commit|https://github.com/apache/ignite/commit/ee2a6f7c3f2e3c9bd8dc61c8dbdf171e933d9481#diff-309ab4ef2fc61d6b2570d390acfb9bd6]
> in
> [ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52]/[modules|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules]/[core|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core]/[src|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src]/[main|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main]/[java|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java]/[org|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org]/[apache|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache]/[ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache/ignite]/[internal|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52/modules/core/src/main/java/org/apache/ignite/internal]/[util|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)
