Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7179288

Rework registry and provider instanitation of javax.image service providers to allow for modules

XMLWordPrintable

      The image I/O API supports pluggable implementation, using the ServiceLoader API to locate and load the providers. Unfortunately this code doesn't work with modules (or Project Jigsaw) because it attempts to load the providers by class name using the system class loader.

      This bug is submitted to re-visit this code so:

      1. It uses Class.forName with ImageIO.class.getClassLoader() for the built-in provider implementations.

      2. It tells ServiceLoader do its job and instantiate instances of additional installed providers.

      This means should mean that this code works with modules, it should also work without modules too as the ServiceLoader API works in legacy/classpath mode too.

      See 7178071 for more details about SQE tests that fail when run in module mode because this code attempt to instantiate com.sun.* types that are not exported.

            prr Philip Race
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: