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: r894234 - /james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/Fields.java
Date Mon, 28 Dec 2009 20:02:56 GMT
Thank you. I thought I committed it but I just saw I have the same
code locally but uncommitted!

Stefano

2009/12/28  <olegk@apache.org>:
> Author: olegk
> Date: Mon Dec 28 19:48:55 2009
> New Revision: 894234
>
> URL: http://svn.apache.org/viewvc?rev=894234&view=rev
> Log:
> Fixed the use of generics
>
> Modified:
>    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/Fields.java
>
> Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/Fields.java
> URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/Fields.java?rev=894234&r1=894233&r2=894234&view=diff
> ==============================================================================
> --- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/Fields.java (original)
> +++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/Fields.java Mon
Dec 28 19:48:55 2009
> @@ -602,16 +602,11 @@
>         return EncoderUtil.isToken(dispositionType);
>     }
>
> -    private static <F extends Field> F parse(FieldParser parser,
> +    private static <F extends ParsedField> F parse(FieldParser<F> parser,
>             String fieldName, String fieldBody) {
>         String rawStr = MimeUtil.fold(fieldName + ": " + fieldBody, 0);
>         ByteSequence raw = ContentUtil.encode(rawStr);
> -
> -        Field field = parser.parse(fieldName, fieldBody, raw);
> -
> -        @SuppressWarnings("unchecked")
> -        F f = (F) field;
> -        return f;
> +        return parser.parse(fieldName, fieldBody, raw);
>     }
>
>     private static String encodeAddresses(Iterable<? extends Address> addresses)
{
>
>
>

Mime
View raw message