8160736: KSS : unnecessary class.forName in TIFFJPEGCompressor.java
authorjdv
Tue, 02 Aug 2016 16:14:59 +0530
changeset 40170 94b31c44865f
parent 40169 2f908aa3e922
child 40171 42ee62f634ea
8160736: KSS : unnecessary class.forName in TIFFJPEGCompressor.java Reviewed-by: prr, bpb, vadim Contributed-by: jayathirth.d.v@oracle.com
jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java	Tue Aug 02 15:55:03 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java	Tue Aug 02 16:14:59 2016 +0530
@@ -79,10 +79,8 @@
 
         try {
             IIORegistry registry = IIORegistry.getDefaultInstance();
-            Class<?> imageReaderClass =
-                Class.forName("javax.imageio.spi.ImageReaderSpi");
             Iterator<?> readerSPIs =
-                registry.getServiceProviders(imageReaderClass,
+                registry.getServiceProviders(ImageReaderSpi.class,
                                              new JPEGSPIFilter(),
                                              true);
             if(readerSPIs.hasNext()) {