[OpenJDK 2D-Dev] RFR: 8154860 ImageIO.getImageReadersByFormatName() fails when jai_imageio is in the classpath
Brian Burkhalter
brian.burkhalter at oracle.com
Fri May 20 20:55:58 UTC 2016
These statements
map.put(provider.getClass(), provider);
poset.add(provider);
occur before the “ if (provider instanceof RegisterableService)” block. Do we really want the provider added to that map and set if the Throwable occurs?
Brian
On May 20, 2016, at 1:07 PM, Phil Race <philip.race at oracle.com> wrote:
> Please review the following workaround for :-
> https://bugs.openjdk.java.net/browse/JDK-8154860
>
> -phil.
>
> --- a/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java
> +++ b/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java
> @@ -770,7 +770,12 @@
> poset.add(provider);
> if (provider instanceof RegisterableService) {
> RegisterableService rs = (RegisterableService)provider;
> + try {
> rs.onRegistration(registry, category);
> + } catch (Throwable t) {
> + System.err.println("Caught and handled this exception :");
> + t.printStackTrace();
> + }
> }
>
> return !present;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160520/d7e3faa4/attachment.html>
More information about the 2d-dev
mailing list