-
Bug
-
Resolution: Not an Issue
-
P3
-
8
-
generic
-
generic
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.
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.
- relates to
-
JDK-7178071 MODULE_MODE: com.sun.imageio required by ImageIO.getImageWriter()
-
- Closed
-