This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

4.0 Patch (please!): ImageIO fix from Classpath


Michael happened to check this patch into GNU Classpath the exact
same day I discovered I needed it for libgcj.
http://lists.gnu.org/archive/html/classpath-patches/2005-04/msg00041.html

The ImageIO spi stuff doesn't work without this (we get a class cast
exception right now).

This is a simple and obvious fix, which is certain not to cause problems
in our frozen branch.   Ok for HEAD and 4.0 branch?

Thanks!


2005-04-11  Michael Koch  <konqueror@gmx.de>

	* javax/imageio/ImageIO.java (ReaderFormatFilter.filter):
	Fixed wrong casting.


Index: javax/imageio/ImageIO.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/imageio/ImageIO.java,v
retrieving revision 1.4
diff -u -p -r1.4 ImageIO.java
--- javax/imageio/ImageIO.java	17 Feb 2005 07:48:47 -0000	1.4
+++ javax/imageio/ImageIO.java	11 Apr 2005 23:45:51 -0000
@@ -80,7 +80,7 @@ public final class ImageIO
     {
       if (provider instanceof ImageReaderSpi)
         {
-          ImageWriterSpi spi = (ImageWriterSpi) provider;
+          ImageReaderSpi spi = (ImageReaderSpi) provider;
           String[] formatNames = spi.getFormatNames();
 
           for (int i = formatNames.length - 1; i >= 0; --i)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]