Browse Source

Translate not ignoring comment lines

PR: 16042
Submitted by: morpheus@smi.stanford.edu (Mark Woon)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273798 13f79535-47bb-0310-9956-ffa450edef68
master
Magesh Umasankar 22 years ago
parent
commit
386d0634b9
2 changed files with 3 additions and 2 deletions
  1. +2
    -0
      WHATSNEW
  2. +1
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java

+ 2
- 0
WHATSNEW View File

@@ -19,6 +19,8 @@ Changes that could break older environments:

Fixed bugs:
-----------
* <translate> was not ignoring comment lines.

* Expand tasks did not behave as expected with PatternSets.

* <property environment=... /> now works on OS/400.


+ 1
- 2
src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java View File

@@ -410,8 +410,7 @@ public class Translate extends MatchingTask {
String line = null;
while ((line = in.readLine()) != null) {
//So long as the line isn't empty and isn't a comment...
if (line.trim().length() > 1 &&
('#' != line.charAt(0) || '!' != line.charAt(0))) {
if (line.trim().length() > 1 && '#' != line.charAt(0) && '!' != line.charAt(0)) {
//Legal Key-Value separators are :, = and white space.
int sepIndex = line.indexOf('=');
if (-1 == sepIndex) {


Loading…
Cancel
Save