commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <>
Subject [jira] Commented: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text
Date Sat, 02 Feb 2008 18:36:13 GMT


Matt Benson commented on LANG-362:

Niall, I've been looking at this today, and I really understand where you're coming from wrt
complexity.  The problem is that this is actually a much more complex task to do properly,
or at least thoroughly, than it may seem at first glance.  The main problem begins with the
fact that preserving the original pattern to be returned by toPattern() doesn't cut it since
the Formats may have been altered by a call to setFormats() (the javadoc for toPattern() actually
states that the result is constructed from internal state).  This in turn means AFAICT that
it must be possible to render a Format back to text; hence my decision to use the  metaFormat
concept (parse and format).  Alternatively, it might be possible to remove only the extended
format information from the pattern given to the superclass, inserting as appropriate into
the super toPattern() result, but keeping track of which formats (and subformats) can be handled
by MessageFormat (and haven't been augmented or overridden by EMF) would be such an exercise
in hard-coding that I am still not convinced that my approach isn't preferable.  WDYT now?

> Add ExtendedMessageFormat to org.apache.commons.lang.text
> ---------------------------------------------------------
>                 Key: LANG-362
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Matt Benson
>            Assignee: Matt Benson
>            Priority: Minor
>             Fix For: 2.4
>         Attachments:, extendedMessageFormat.patch.txt, extendedMessageFormat.patch.txt,,
> Discussed on dev@ (
); adding here for tracking purposes and in case anyone has any serious objections to my implementation.
 Patch forthcoming...

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message