This patch fixes the case where not all tokens are found. Previously, the code searched for the next token from where the last one was found. This is not necessary and in fact problematic as the line it is searching has already had the previous token replaced so the contents have been changed. Starting the search from the beginning of the line is the desired behavior. This was originally submitted to the ant-dev list before I knew of the existence of this patch list. ? Translate.diff Index: Translate.java =================================================================== RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java,v retrieving revision 1.19 diff -r1.19 Translate.java 516c516 < startIndex = line.indexOf(startToken, endIndex + etLength); --- > startIndex = line.indexOf(startToken);
There has been a similar bug report which is fixed in CVS since June 30, 2003 Try to download a nightly build to see if your case is fixed. Cheers, Antoine *** This bug has been marked as a duplicate of 17297 ***