Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 83726 invoked from network); 18 Apr 2006 15:07:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Apr 2006 15:07:43 -0000 Received: (qmail 3892 invoked by uid 500); 18 Apr 2006 15:06:47 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 3822 invoked by uid 500); 18 Apr 2006 15:06:47 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 3811 invoked by uid 99); 18 Apr 2006 15:06:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 08:06:46 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 18 Apr 2006 08:06:46 -0700 Received: (qmail 82048 invoked by uid 65534); 18 Apr 2006 15:06:09 -0000 Message-ID: <20060418150608.81993.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: cvs@cocoon.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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(); }