Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 58909 invoked from network); 19 Nov 2002 13:28:50 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Nov 2002 13:28:50 -0000 Received: (qmail 9390 invoked by uid 97); 19 Nov 2002 13:29:48 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 9343 invoked by uid 97); 19 Nov 2002 13:29:47 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 9332 invoked by uid 97); 19 Nov 2002 13:29:47 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 19 Nov 2002 13:28:43 -0000 Message-ID: <20021119132843.97511.qmail@icarus.apache.org> From: jstrachan@apache.org To: jakarta-commons-sandbox-cvs@apache.org Subject: cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl suite.jelly X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jstrachan 2002/11/19 05:28:43 Modified: jelly/src/java/org/apache/commons/jelly/impl TagScript.java jelly/src/java/org/apache/commons/jelly/tags/jsl TemplateTag.java jelly/src/test/org/apache/commons/jelly/jsl suite.jelly Log: Patch to fix dIon's bug with JSL. The fix was for TagScript to properly set the parent tag each time its used; there was a danger of the Tag being cached and its old parent being used when inside loops. This should now fix any similar related bugs. Moving forward, it might be worth optimizing the TagScript code so that the Script.run() method takes the parent Tag to use. Then the thread local tag hierarchy can be maintained on the stack, rather than using ThreadLocal variables that we currently use. This would be faster and simpler I suspect. Revision Changes Path 1.28 +6 -6 jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TagScript.java Index: TagScript.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- TagScript.java 10 Nov 2002 11:09:05 -0000 1.27 +++ TagScript.java 19 Nov 2002 13:28:42 -0000 1.28 @@ -296,10 +296,10 @@ if ( tag == null ) { tag = createTag(); if ( tag != null ) { - configureTag(tag); tagHolder.set(tag); } } + configureTag(tag); return tag; } 1.7 +4 -3 jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/TemplateTag.java Index: TemplateTag.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/TemplateTag.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TemplateTag.java 23 Oct 2002 16:27:44 -0000 1.6 +++ TemplateTag.java 19 Nov 2002 13:28:43 -0000 1.7 @@ -62,6 +62,7 @@ import org.apache.commons.jelly.JellyException; import org.apache.commons.jelly.TagSupport; import org.apache.commons.jelly.XMLOutput; +import org.apache.commons.jelly.tags.xml.XPathSource; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -77,7 +78,7 @@ * @author James Strachan * @version $Revision$ */ -public class TemplateTag extends TagSupport { +public class TemplateTag extends TagSupport implements XPathSource { /** The Log to which logging calls will be made. */ private Log log = LogFactory.getLog(TemplateTag.class); @@ -102,6 +103,7 @@ public TemplateTag() { } + // Tag interface //------------------------------------------------------------------------- public void doTag(XMLOutput output) throws Exception { @@ -125,8 +127,7 @@ //------------------------------------------------------------------------- /** - * @return the current XPath iteration value - * so that any other XPath aware child tags to use + * @return the current XPath value on which relative paths are evaluated */ public Object getXPathSource() { return xpathSource; 1.5 +0 -2 jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl/suite.jelly Index: suite.jelly =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl/suite.jelly,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- suite.jelly 19 Nov 2002 13:14:00 -0000 1.4 +++ suite.jelly 19 Nov 2002 13:28:43 -0000 1.5 @@ -29,9 +29,7 @@ full=${full},short=${short} - -- To unsubscribe, e-mail: For additional commands, e-mail: