The following comment has been added to this issue:

     Author: Vincent Massol
    Created: Wed, 28 Jul 2004 11:01 AM
       Body:
dIon, no it doesn't. The replace tag replaces only a single char:

  String stringAnswer = answer.toString().replace(oldChar.charAt(0), 
newChar.charAt(0));

It would be nice to replace the existing replace jelly tag with the following replace 
implementation:

    /**
     * @param original the original template
     * @param oldPattern the pattern to replace
     * @param newPattern the new pattern
     * @return the modified template string with patterns applied
     */
    public String replace(String original, String oldPattern,
        String newPattern)
    {
        int index, oldIndex;
        StringBuffer buffer = new StringBuffer();
        
        if((index = original.indexOf(oldPattern)) != -1) {
            oldIndex = 0;
            while((index = original.indexOf(oldPattern, oldIndex)) != -1) {
                buffer.append(original.substring(oldIndex, index));
                buffer.append(newPattern);
                oldIndex = index + oldPattern.length();
            }
            buffer.append(original.substring(oldIndex));
            original = buffer.toString();
        }
        return original;
    }




---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MPANNOUNCEMENT-9?page=comments#action_22457

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MPANNOUNCEMENT-9

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPANNOUNCEMENT-9
    Summary: Add a goal to send the announcement by mail to a list of email addresses
       Type: New Feature

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven-announcement-plugin
   Versions:
             1.2

   Assignee: Vincent Massol
   Reporter: Vincent Massol

    Created: Thu, 8 Jul 2004 4:16 AM
    Updated: Wed, 28 Jul 2004 11:01 AM

Description:



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to