You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Matt Benson (JIRA)" <ji...@apache.org> on 2008/02/02 19:36:13 UTC

[jira] Commented: (LANG-362) Add ExtendedMessageFormat to org.apache.commons.lang.text

    [ https://issues.apache.org/jira/browse/LANG-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565097#action_12565097 ] 

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: https://issues.apache.org/jira/browse/LANG-362
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Matt Benson
>            Assignee: Matt Benson
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: DateFormatFactory.java, extendedMessageFormat.patch.txt, extendedMessageFormat.patch.txt, ExtendedMessageFormat2.java, FormatFactory.java
>
>
> Discussed on dev@ ( http://mail-archives.apache.org/mod_mbox/commons-dev/200710.mbox/%3c590921.30381.qm@web55103.mail.re4.yahoo.com%3e ); 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.