git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1342959 13f79535-47bb-0310-9956-ffa450edef68master
@@ -4,6 +4,13 @@ Changes from Ant 1.8.4 TO Ant 1.9.0 | |||||
Changes that could break older environments: | Changes that could break older environments: | ||||
------------------------------------------- | ------------------------------------------- | ||||
* FixCRLF used to treat the EOL value ASIS to convert to the system property | |||||
line.separator. Specified was that ASIS would leave the EOL characters alone, | |||||
the task now really leaves the EOL characters alone. This also implies that | |||||
EOL ASIS will not insert a newline even if fixlast is set to true. | |||||
Bugzilla report 53036 | |||||
Fixed bugs: | Fixed bugs: | ||||
----------- | ----------- | ||||
@@ -280,7 +280,7 @@ | |||||
<tr> | <tr> | ||||
<td valign="top">fixlast</td> | <td valign="top">fixlast</td> | ||||
<td valign="top">Whether to add a missing EOL to the last line | <td valign="top">Whether to add a missing EOL to the last line | ||||
of a processed file. <b>Since Ant 1.6.1</b></td> | |||||
of a processed file.<br/>Ignored if EOL is asis.<br/><b>Since Ant 1.6.1</b></td> | |||||
<td align="center" colspan="2">No; default is <i>true</i></td> | <td align="center" colspan="2">No; default is <i>true</i></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -239,9 +239,6 @@ public final class FixCrLfFilter extends BaseParamFilterReader implements Chaina | |||||
private static String calculateEolString(CrLf eol) { | private static String calculateEolString(CrLf eol) { | ||||
// Calculate the EOL string per the current config | // Calculate the EOL string per the current config | ||||
if (eol == CrLf.ASIS) { | |||||
return System.getProperty("line.separator"); | |||||
} | |||||
if (eol == CrLf.CR || eol == CrLf.MAC) { | if (eol == CrLf.CR || eol == CrLf.MAC) { | ||||
return "\r"; | return "\r"; | ||||
} | } | ||||
@@ -265,7 +262,10 @@ public final class FixCrLfFilter extends BaseParamFilterReader implements Chaina | |||||
// Change all EOL characters to match the calculated EOL string. If | // Change all EOL characters to match the calculated EOL string. If | ||||
// configured to do so, append a trailing EOL so that the file ends on | // configured to do so, append a trailing EOL so that the file ends on | ||||
// a EOL. | // a EOL. | ||||
in = new NormalizeEolFilter(in, calculateEolString(eol), getFixlast()); | |||||
if (eol != CrLf.ASIS) | |||||
{ | |||||
in = new NormalizeEolFilter(in, calculateEolString(eol), getFixlast()); | |||||
} | |||||
if (tabs != AddAsisRemove.ASIS) { | if (tabs != AddAsisRemove.ASIS) { | ||||
// If filtering Java source, prevent changes to whitespace in | // If filtering Java source, prevent changes to whitespace in | ||||