git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1372266 13f79535-47bb-0310-9956-ffa450edef68master
@@ -50,6 +50,10 @@ Fixed bugs: | |||||
handledirsep="true". | handledirsep="true". | ||||
Bugzilla Report 53399. | Bugzilla Report 53399. | ||||
* <expandproperties> filter caused a NullPointerExcpetion when input | |||||
was empty. | |||||
Bugzilla Report 53626. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
@@ -107,9 +107,13 @@ public final class ExpandProperties | |||||
} | } | ||||
}; | }; | ||||
} | } | ||||
buffer = new ParseProperties(project, PropertyHelper.getPropertyHelper(project) | |||||
.getExpanders(), getProperty).parseProperties(data).toString() | |||||
.toCharArray(); | |||||
Object expanded = new ParseProperties(project, PropertyHelper | |||||
.getPropertyHelper(project) | |||||
.getExpanders(), | |||||
getProperty) | |||||
.parseProperties(data); | |||||
buffer = expanded == null ? new char[0] | |||||
: expanded.toString().toCharArray(); | |||||
} | } | ||||
if (index < buffer.length) { | if (index < buffer.length) { | ||||
return buffer[index++]; | return buffer[index++]; | ||||
@@ -74,4 +74,19 @@ | |||||
</au:assertTrue> | </au:assertTrue> | ||||
</target> | </target> | ||||
<target name="testEmptyResource" | |||||
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53626"> | |||||
<au:assertTrue> | |||||
<resourcesmatch> | |||||
<string value="" /> | |||||
<concat> | |||||
<string value="" /> | |||||
<filterchain> | |||||
<expandproperties /> | |||||
</filterchain> | |||||
</concat> | |||||
</resourcesmatch> | |||||
</au:assertTrue> | |||||
</target> | |||||
</project> | </project> |