On Tue, 8 Jul 2003, Victor J. Orlikowski <[EMAIL PROTECTED]> wrote: > Hence, the BSFManager exec() method should now take the language > and script parameters only, as was the case in 2.2.
Neither 2.2 nor 2.3.0-rc have a two-arg version of BSFManager#exec. If I change Ant to pass only two arguments, Ant will not compile against any released version of BSF. Maybe you could put the five arg versions of eval, exec and apply back in (deprecated off course) and ignore arguments two to five? This would give us a migration phase until 2.3.0 final has been released - after which we'll happily change our invocation. See the patch below, if you like the idea. Stefan Index: src/org/apache/bsf/BSFManager.java =================================================================== RCS file: /home/cvspublic/jakarta-bsf/src/org/apache/bsf/BSFManager.java,v retrieving revision 1.2 diff -u -r1.2 BSFManager.java --- src/org/apache/bsf/BSFManager.java 8 Jul 2003 02:56:49 -0000 1.2 +++ src/org/apache/bsf/BSFManager.java 8 Jul 2003 14:56:31 -0000 @@ -167,6 +167,33 @@ * parameters and return the resulting value. * * @param lang language identifier + * @param source <b>ignored</b> + * @param lineNo <b>ignored</b> + * @param columnNo <b>ignored</b> + * @param funcBody the multi-line, value returning script to evaluate + * @param paramNames the names of the parameters above assumes + * @param arguments values of the above parameters + * + * @exception BSFException if anything goes wrong while running the script + * + * @deprecated use the four-arg version instead. + */ + public Object apply(String lang, + String source, + int lineNo, + int columnNo, + Object funcBody, + Vector paramNames, + Vector arguments) + throws BSFException { + return apply(lang, funcBody, paramNames, arguments); + } + + /** + * Apply the given anonymous function of the given language to the given + * parameters and return the resulting value. + * + * @param lang language identifier * @param funcBody the multi-line, value returning script to evaluate * @param paramNames the names of the parameters above assumes * @param arguments values of the above parameters @@ -204,6 +231,35 @@ * language to the given parameters into the given <tt>CodeBuffer</tt>. * * @param lang language identifier + * @param source <b>ignored</b> + * @param lineNo <b>ignored</b> + * @param columnNo <b>ignored</b> + * @param funcBody the multi-line, value returning script to evaluate + * @param paramNames the names of the parameters above assumes + * @param arguments values of the above parameters + * @param cb code buffer to compile into + * + * @exception BSFException if anything goes wrong while running the script + * + * @deprecated use the five-arg version instead. + */ + public void compileApply(String lang, + String source, + int lineNo, + int columnNo, + Object funcBody, + Vector paramNames, + Vector arguments, + CodeBuffer cb) + throws BSFException { + compileApply(lang, funcBody, paramNames, arguments, cb); + } + + /** + * Compile the application of the given anonymous function of the given + * language to the given parameters into the given <tt>CodeBuffer</tt>. + * + * @param lang language identifier * @param funcBody the multi-line, value returning script to evaluate * @param paramNames the names of the parameters above assumes * @param arguments values of the above parameters @@ -240,6 +296,31 @@ * <tt>CodeBuffer</tt>. * * @param lang language identifier + * @param source <b>ignored</b> + * @param lineNo <b>ignored</b> + * @param columnNo <b>ignored</b> + * @param expr the expression to compile + * @param cb code buffer to compile into + * + * @exception BSFException if any error while compiling the expression + * + * @deprecated use the three-arg version instead. + */ + public void compileExpr(String lang, + String source, + int lineNo, + int columnNo, + Object expr, + CodeBuffer cb) + throws BSFException { + compileExpr(lang, expr, cb); + } + + /** + * Compile the given expression of the given language into the given + * <tt>CodeBuffer</tt>. + * + * @param lang language identifier * @param expr the expression to compile * @param cb code buffer to compile into * @@ -270,6 +351,31 @@ * <tt>CodeBuffer</tt>. * * @param lang language identifier + * @param source <b>ignored</b> + * @param lineNo <b>ignored</b> + * @param columnNo <b>ignored</b> + * @param script the script to compile + * @param cb code buffer to compile into + * + * @exception BSFException if any error while compiling the script + * + * @deprecated use the three-arg version instead. + */ + public void compileScript(String lang, + String source, + int lineNo, + int columnNo, + Object script, + CodeBuffer cb) + throws BSFException { + compileScript(lang, script, cb); + } + + /** + * Compile the given script of the given language into the given + * <tt>CodeBuffer</tt>. + * + * @param lang language identifier * @param script the script to compile * @param cb code buffer to compile into * @@ -346,6 +452,29 @@ * resulting value. * * @param lang language identifier + * @param source <b>ignored</b> + * @param lineNo <b>ignored</b> + * @param columnNo <b>ignored</b> + * @param expr the expression to evaluate + * + * @exception BSFException if anything goes wrong while running the script + * + * @deprecated use the two-arg version instead. + */ + public Object eval(String lang, + String source, + int lineNo, + int columnNo, + Object expr) + throws BSFException { + return eval(lang, expr); + } + + /** + * Evaluate the given expression of the given language and return the + * resulting value. + * + * @param lang language identifier * @param expr the expression to evaluate * * @exception BSFException if anything goes wrong while running the script @@ -384,6 +513,28 @@ * Execute the given script of the given language. * * @param lang language identifier + * @param source <b>ignored</b> + * @param lineNo <b>ignored</b> + * @param columnNo <b>ignored</b> + * @param script the script to execute + * + * @exception BSFException if anything goes wrong while running the script + * + * @deprecated use the two-arg version instead. + */ + public void exec(String lang, + String source, + int lineNo, + int columnNo, + Object script) + throws BSFException { + exec(lang, script); + } + + /** + * Execute the given script of the given language. + * + * @param lang language identifier * @param script the script to execute * * @exception BSFException if anything goes wrong while running the script @@ -405,6 +556,29 @@ catch (PrivilegedActionException prive) { throw (BSFException) prive.getException(); } + } + + /** + * Execute the given script of the given language, attempting to + * emulate an interactive session w/ the language. + * + * @param lang language identifier + * @param source <b>ignored</b> + * @param lineNo <b>ignored</b> + * @param columnNo <b>ignored</b> + * @param script the script to execute + * + * @exception BSFException if anything goes wrong while running the script + * + * @deprecated use the two-arg version instead. + */ + public void iexec(String lang, + String source, + int lineNo, + int columnNo, + Object script) + throws BSFException { + iexec(lang, script); } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]