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 5f10acc compute effective properties permitting null values 5f10acc is described below commit 5f10acc1a13d1018cf3ad6ac32cb0f54c8ca5151 Author: Matt Benson <mben...@apache.org> AuthorDate: Fri Feb 25 10:46:56 2022 -0600 compute effective properties permitting null values --- src/main/org/apache/tools/ant/util/ScriptRunnerBase.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java index e9029ee..dee11a9 100644 --- a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java +++ b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java @@ -27,8 +27,6 @@ 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; @@ -335,8 +333,9 @@ public abstract class ScriptRunnerBase { public void bindToComponent(ProjectComponent component) { project = component.getProject(); - addBeans(project.getPropertyNames().stream() - .collect(Collectors.toMap(Function.identity(), project::getProperty))); + final Map<String, Object> effectiveProperties = new HashMap<>(); + project.getPropertyNames().forEach(n -> effectiveProperties.put(n, project.getProperty(n))); + addBeans(effectiveProperties); addBeans(project.getCopyOfTargets()); addBeans(project.getCopyOfReferences()); addBean("project", project);