src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java

Print this page
rev 9343 : 8033716: Fix raw and unchecked lint warnings in com.sun.imageio
Reviewed-by: darcy, prr, bae

@@ -1323,14 +1323,15 @@
 
     private void writeEmbedded(IIOImage image,
                                ImageWriteParam bmpParam) throws IOException {
         String format =
             compressionType == BI_JPEG ? "jpeg" : "png";
-        Iterator iterator = ImageIO.getImageWritersByFormatName(format);
+        Iterator<ImageWriter> iterator =
+               ImageIO.getImageWritersByFormatName(format);
         ImageWriter writer = null;
         if (iterator.hasNext())
-            writer = (ImageWriter)iterator.next();
+            writer = iterator.next();
         if (writer != null) {
             if (embedded_stream == null) {
                 throw new RuntimeException("No stream for writing embedded image!");
             }