Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-8146

JDK9: IgniteUtils classLoaderUrls() JDK9 bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.4
    • 2.7
    • general
    • Patch

    Description

      Reporting a probable miss that breaks JDK9 compatibility.

      As part of this commit  in ignite/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.

      Attachments

        Issue Links

          Activity

            People

              tledkov-gridgain Taras Ledkov
              sujit.rect@gmail.com Sujit Kumar Mahapatra
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 48h
                  48h
                  Remaining:
                  Remaining Estimate - 48h
                  48h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified