geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1127882 - /geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
Date Thu, 26 May 2011 12:17:58 GMT
Author: xuhaihong
Date: Thu May 26 12:17:57 2011
New Revision: 1127882

URL: http://svn.apache.org/viewvc?rev=1127882&view=rev
Log:
Fix the Illegal output type exception while invoking setOut method

Modified:
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java?rev=1127882&r1=1127881&r2=1127882&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
Thu May 26 12:17:57 2011
@@ -70,7 +70,7 @@ public class AbstractImageHandler implem
             throw new UnsupportedDataTypeException("Unknown image type " + flavour.getMimeType());
         }
         ImageWriter writer = (ImageWriter) i.next();
-        writer.setOutput(os);
+        writer.setOutput(ImageIO.createImageOutputStream(os));
 
         if (obj instanceof RenderedImage) {
             writer.write((RenderedImage) obj);



Mime
View raw message