cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r591511 - /cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/javascript/JavaScriptExpression.java
Date Fri, 02 Nov 2007 23:23:15 GMT
Author: gkossakowski
Date: Fri Nov  2 16:23:14 2007
New Revision: 591511

URL: http://svn.apache.org/viewvc?rev=591511&view=rev
Log:
Clean up.

Modified:
    cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/javascript/JavaScriptExpression.java

Modified: cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/javascript/JavaScriptExpression.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/javascript/JavaScriptExpression.java?rev=591511&r1=591510&r2=591511&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/javascript/JavaScriptExpression.java
(original)
+++ cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/javascript/JavaScriptExpression.java
Fri Nov  2 16:23:14 2007
@@ -18,7 +18,6 @@
 
 import java.util.Iterator;
 import java.util.Map;
-import java.io.StringReader;
 
 import org.apache.cocoon.el.ExpressionException;
 import org.apache.cocoon.el.impl.AbstractExpression;
@@ -46,16 +45,7 @@
     private void compile() {
         Context ctx = Context.enter();
         try {
-            // Note: used compileReader instead of compileString to work with the older Rhino
in C2.1
-            this.script = ctx.compileReader(getScope(rootScope), new StringReader(getExpression()),
"", 1, null);
-        } catch (Exception e) {
-            // Note: this catch block is only needed for the Rhino in C2.1 where the older
-            //       Rhino does not throw RuntimeExceptions
-            if (e instanceof RuntimeException) {
-                throw (RuntimeException)e;
-            } else{
-                throw new RuntimeException("Runtime exception.", e);
-            }
+            this.script = ctx.compileString(getExpression(), "", 1, null);
         } finally {
             Context.exit();
         }



Mime
View raw message