https://bz.apache.org/bugzilla/show_bug.cgi?id=67082
Bug ID: 67082
Summary: [Regression] pathconvert trims output since
implementation change in 1.10.13
Product: Ant
Version: 1.10.13
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Consider a <pathconvert> that starts with leading spaces in 'out':
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="printRootDirs">
<target name="printRootDirs">
<pathconvert pathsep="
" property="formatted">
<globmapper from="/*" to=" /*"/>
<path>
<dirset dir="/">
<include name="*"/>
</dirset>
</path>
</pathconvert>
<echo message="Root directories:"/>
<echo message="${formatted}"/>
</target>
</project>
Output of Ant <= 1.10.12:
Buildfile: /tmp/build.xml
printRootDirs:
[echo] Root directories:
[echo] /bin
[echo] /boot
[echo] /dev
[echo] /etc
[echo] /home
[echo] /lib
...
Output of Ant >= 1.10.13:
Buildfile: /tmp/build.xml
printRootDirs:
[echo] Root directories:
[echo] /bin
[echo] /boot
[echo] /dev
[echo] /etc
[echo] /home
[echo] /lib
...
As you can see, the output was trimmed, the spaces before '/bin' are missing.
Cause:
https://github.com/apache/ant/commit/90ed3ff6cca8634e38d7c3c82858ce48c9c4be2b#diff-500aff0125d09bd8e972a11909a5a811518a845a6635b807a7841371aa5ec99dR377
The PropertyOutputStream by default enables trimmed output.
This should be explicitly set to false.
--
You are receiving this mail because:
You are the assignee for the bug.