You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2012/07/08 13:38:33 UTC

[jira] [Resolved] (DELTASPIKE-225) simplify fluent Message API

     [ https://issues.apache.org/jira/browse/DELTASPIKE-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved DELTASPIKE-225.
--------------------------------------

    Resolution: Fixed
    
> simplify fluent Message API
> ---------------------------
>
>                 Key: DELTASPIKE-225
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-225
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: I18n-Module
>    Affects Versions: 0.3-incubating
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 0.3-incubating
>
>
> We currently have a pretty complex fluent API for our message stuff. Imo a bit too fluent. The main focus is on always creating immutable objects, but this causes quite some overhead. In fact, the MessageContext itself is always being created as @Dependent scoped bean, thus chances to modify a MessageContext in concurrent manner is not high. Thus we could easily merge MessageContext with MessageContext.Config - we just need to make people aware that they change the MessageContext itself with the fluent API (builder pattern). We can also add a cloneContext() method which will create a new instance based on the current configuration. 
> The same simplification can be done with MessageBuilder with Message. It doesn't make much sense to distinct between a MessageBuilder#addArguments(...) and Message#addArguments(...). They really do the same.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira