Author: sebb Date: Thu Mar 26 00:34:56 2009 New Revision: 758483 URL: http://svn.apache.org/viewvc?rev=758483&view=rev Log: Change the evaluation to use the context
Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestCompiledScript.java jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestScriptEngine.java Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestCompiledScript.java URL: http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestCompiledScript.java?rev=758483&r1=758482&r2=758483&view=diff ============================================================================== --- jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestCompiledScript.java (original) +++ jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestCompiledScript.java Thu Mar 26 00:34:56 2009 @@ -37,7 +37,7 @@ } public Object eval(ScriptContext context) throws ScriptException { - return compiled; + return context.getAttribute(compiled); } public ScriptEngine getEngine() { Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestScriptEngine.java URL: http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestScriptEngine.java?rev=758483&r1=758482&r2=758483&view=diff ============================================================================== --- jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestScriptEngine.java (original) +++ jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/utils/TestScriptEngine.java Thu Mar 26 00:34:56 2009 @@ -76,9 +76,10 @@ return sb.toString(); } + // Very simple evaluator - just return the context value for the script public Object eval(String script, ScriptContext context) throws ScriptException { - return script; + return context.getAttribute(script); } public ScriptEngineFactory getFactory() { --------------------------------------------------------------------- To unsubscribe, e-mail: bsf-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: bsf-dev-h...@jakarta.apache.org