james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Commented] (MIME4J-192) setFlatMode and setContentDecoding are not exposed by the MessageBuilder interface
Date Sun, 17 Apr 2011 12:46:05 GMT

    [ https://issues.apache.org/jira/browse/MIME4J-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020791#comment-13020791
] 

Stefano Bagnara commented on MIME4J-192:
----------------------------------------

@Oleg, please accept that my "logical" is different from your "logical". That's why I need
to ask questions now when I want to understand the current logic (as it is not logical for
me). So, I'm fine with your logic, but given that I don't understand it please don't get upset
when I ask questions on how I have to use it. 

If I put my hands in the code to fix stuff myself I will probably introduce something that
is illogical for you (e.g. the logical solution to me was to add the methods to the interface)
so I guess I did the right thing opening this bug and asking for your opinion and I can't
accept your "for the sake of sweet Jesus" in reply.

> setFlatMode and setContentDecoding are not exposed by the MessageBuilder interface
> ----------------------------------------------------------------------------------
>
>                 Key: MIME4J-192
>                 URL: https://issues.apache.org/jira/browse/MIME4J-192
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>          Components: dom
>    Affects Versions: 0.7
>            Reporter: Stefano Bagnara
>             Fix For: 0.7
>
>
> Here is jDKIM use case:
> ----
>     public Message(InputStream is) throws IOException, MimeException {
>         MessageBuilder mb = newMessageBuilder();
>         
>         if (mb instanceof MessageBuilderImpl) {
>         	((MessageBuilderImpl) mb).setFlatMode(true);
>         	((MessageBuilderImpl) mb).setContentDecoding(false);
>         }
>         org.apache.james.mime4j.dom.Message mImpl = mb.parse(new EOLConvertingInputStream(is));
>         
>         this.message = mImpl;
>     }
> ----
> Is this the expected client pattern? Or should we expose setFlatMode and setContentDecoding
in the MessageBuilder interface so to remove the class casting requirement?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message