This is an automated email from the ASF dual-hosted git repository.
mbenson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 3d83934 bind all effective properties to script* tasks/types
3d83934 is described below
commit 3d83934603c1f9036ed548eda37a633f68077766
Author: Matt Benson <[email protected]>
AuthorDate: Thu Feb 24 14:35:48 2022 -0600
bind all effective properties to script* tasks/types
---
src/main/org/apache/tools/ant/util/ScriptRunnerBase.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
index f45988e..e9029ee 100644
--- a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
+++ b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
@@ -27,6 +27,8 @@ import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.HashMap;
import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
@@ -332,8 +334,9 @@ public abstract class ScriptRunnerBase {
*/
public void bindToComponent(ProjectComponent component) {
project = component.getProject();
- addBeans(project.getProperties());
- addBeans(project.getUserProperties());
+
+ addBeans(project.getPropertyNames().stream()
+ .collect(Collectors.toMap(Function.identity(),
project::getProperty)));
addBeans(project.getCopyOfTargets());
addBeans(project.getCopyOfReferences());
addBean("project", project);