cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r394961 - in /cocoon: branches/BRANCH_2_1_X/ branches/BRANCH_2_1_X/src/blocks/template/ trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/accessor/ trunk/blocks/cocoon-template/cocoon-template-impl...
Date Tue, 18 Apr 2006 15:05:58 GMT
Author: cziegeler
Date: Tue Apr 18 08:05:47 2006
New Revision: 394961

URL: http://svn.apache.org/viewcvs?rev=394961&view=rev
Log:
Make template block compilable with JDK 13 and enable it in 2.1.x by default

Removed:
    cocoon/branches/BRANCH_2_1_X/src/blocks/template/readme.txt
Modified:
    cocoon/branches/BRANCH_2_1_X/blocks.properties
    cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/accessor/MapAccessor.java
    cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/expression/javascript/JavaScriptExpression.java

Modified: cocoon/branches/BRANCH_2_1_X/blocks.properties
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/blocks.properties?rev=394961&r1=394960&r2=394961&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/blocks.properties (original)
+++ cocoon/branches/BRANCH_2_1_X/blocks.properties Tue Apr 18 08:05:47 2006
@@ -192,7 +192,7 @@
 #include.block.stx=false
 #-----[dependency]: "taglib" is needed by "faces".
 #include.block.taglib=false
-include.block.template=false
+#include.block.template=false
 #-----[dependency]: "tour" depends on "batik", "fop", "forms", "slop".
 #include.block.tour=false
 #include.block.validation=false

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/accessor/MapAccessor.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/accessor/MapAccessor.java?rev=394961&r1=394960&r2=394961&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/accessor/MapAccessor.java
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/accessor/MapAccessor.java
Tue Apr 18 08:05:47 2006
@@ -18,6 +18,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -104,7 +105,7 @@
                 return accessor.getObject();
             } catch (ServiceException e) {
                 // FIXME: Don't know if this is the appropriate action
-                throw new RuntimeException("Trying to access non existing acessor: " +
+                throw new CascadingRuntimeException("Trying to access non existing acessor:
" +
                                            accessorName, e);
             } finally {
                 accessorSelector.release(accessor);

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/expression/javascript/JavaScriptExpression.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/expression/javascript/JavaScriptExpression.java?rev=394961&r1=394960&r2=394961&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/expression/javascript/JavaScriptExpression.java
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/components/expression/javascript/JavaScriptExpression.java
Tue Apr 18 08:05:47 2006
@@ -24,6 +24,7 @@
 import java.util.Map;
 import java.io.StringReader;
 
+import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.cocoon.components.expression.AbstractExpression;
 import org.apache.cocoon.components.expression.ExpressionContext;
 import org.apache.cocoon.components.expression.ExpressionException;
@@ -52,10 +53,11 @@
         } 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)
+            if (e instanceof RuntimeException) {
                 throw (RuntimeException)e;
-            else
-                throw new RuntimeException(e);
+            } else{
+                throw new CascadingRuntimeException("Runtime exception.", e);
+            }
         } finally {
             Context.exit();
         }
@@ -79,10 +81,11 @@
         } 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)
+            if (e instanceof RuntimeException) {
                 throw (RuntimeException)e;
-            else
-                throw new RuntimeException(e);
+            } else {
+                throw new CascadingRuntimeException("Runtime exception", e);
+            }
         } finally {
             Context.exit();
         }



Mime
View raw message