This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
4.0 Patch (please!): ImageIO fix from Classpath
- From: Anthony Green <green at redhat dot com>
- To: java-patches at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
- Cc: Michael Koch <konqueror at gmx dot de>
- Date: Mon, 11 Apr 2005 16:54:10 -0700
- Subject: 4.0 Patch (please!): ImageIO fix from Classpath
- Organization: Red Hat, Inc.
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)