This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 50a5b5d1f25c56b6d4c640ae114b47310952cb7c
Author: Josh Tynjala <[email protected]>
AuthorDate: Thu Jun 20 14:40:58 2024 -0700

    CustomPlayerCommand: Execute.getProcEnvironment() is deprecated, replace 
with suggested Execute.getEnvironmentVariables()
---
 .../royale/test/ant/launcher/commands/player/CustomPlayerCommand.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/CustomPlayerCommand.java
 
b/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/CustomPlayerCommand.java
index dc2848fab..14c267b5b 100644
--- 
a/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/CustomPlayerCommand.java
+++ 
b/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/CustomPlayerCommand.java
@@ -129,10 +129,10 @@ public class CustomPlayerCommand implements ProcessCommand
      * behavior of the Execute task.  Needed especially when user expects 
environment to be 
      * available to custom command (e.g. - xvnc with player not on path).
      */
-    @SuppressWarnings("unchecked")
     private String[] getJointEnvironment()
     {
-        Vector procEnvironment = Execute.getProcEnvironment();
+        Vector<String> procEnvironment = new Vector<>();
+        Execute.getEnvironmentVariables().forEach((key, value) -> 
procEnvironment.add(key + "=" + value));
         String[] environment = new String[procEnvironment.size() + 
proxiedCommand.getEnvironment().length];
         System.arraycopy(procEnvironment.toArray(), 0, environment, 0, 
procEnvironment.size());
         System.arraycopy(proxiedCommand.getEnvironment(), 0, environment, 
procEnvironment.size(), proxiedCommand.getEnvironment().length);

Reply via email to