Mark Struberg created DELTASPIKE-225:
----------------------------------------
Summary: 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