ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16186] New: - [PATCH] Fixes Translate task where not all tokens were found
Date Thu, 16 Jan 2003 23:11:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16186>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16186

[PATCH] Fixes Translate task where not all tokens were found

           Summary: [PATCH] Fixes Translate task where not all tokens were
                    found
           Product: Ant
           Version: 1.6Alpha (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: mrdon@twdata.org


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);

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message