From f18d4b424dd49116185295c5bec052cd0229b38c Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Fri, 11 May 2007 14:00:14 +0000 Subject: [PATCH] Allow javafx to be run. The current version of openjfx has a requirement that beans are defined with their types in the format : Hopefully, this will change, in the meantime this hack allows openjfx scripts to be run in ant as follows: git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@537194 13f79535-47bb-0310-9956-ffa450edef68 --- .../tools/ant/util/optional/JavaxScriptRunner.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java b/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java index 0bd3776e4..5b2c4aa78 100644 --- a/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java +++ b/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java @@ -90,8 +90,16 @@ public class JavaxScriptRunner extends ScriptRunnerBase { for (Iterator i = getBeans().keySet().iterator(); i.hasNext();) { String key = (String) i.next(); Object value = getBeans().get(key); - engine.invoke( - "put", String.class, key, Object.class, value); + if ("FX".equals(getLanguage())) { + engine.invoke( + "put", String.class, key + + ":" + value.getClass().getName(), + Object.class, value); + } else { + engine.invoke( + "put", String.class, key, + Object.class, value); + } } // execute the script return engine.invoke("eval", String.class, getScript());