james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: svn commit: r778453 - in /james/mime4j/trunk/core/src: main/java/org/apache/james/mime4j/message/ test/java/org/apache/james/mime4j/message/
Date Sun, 31 May 2009 18:12:39 GMT
mwiederkehr@apache.org ha scritto:
> Author: mwiederkehr
> Date: Mon May 25 17:02:25 2009
> New Revision: 778453
> 
> URL: http://svn.apache.org/viewvc?rev=778453&view=rev
> Log:
> MIME4J-136: Pull up getInputStream() from BinaryBody to SingleBody
> [....]
> Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/StringTextBody.java
> URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/StringTextBody.java?rev=778453&r1=778452&r2=778453&view=diff
> ==============================================================================
> --- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/StringTextBody.java
(original)
> +++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/StringTextBody.java
Mon May 25 17:02:25 2009
> @@ -19,7 +19,9 @@
>  
>  package org.apache.james.mime4j.message;
>  
> +import java.io.ByteArrayInputStream;
>  import java.io.IOException;
> +import java.io.InputStream;
>  import java.io.OutputStream;
>  import java.io.OutputStreamWriter;
>  import java.io.Reader;
> @@ -48,6 +50,11 @@
>      }
>  
>      @Override
> +    public InputStream getInputStream() throws IOException {
> +        return new ByteArrayInputStream(text.getBytes(charset));
> +    }

String.getBytes(Charset) is a java6 only method.

Hudson failed since this commit.

I just replaced charset with charset.name(), please review as I don't
know that code. Hudson now passes.

Stefano

Mime
View raw message