Return-Path: Delivered-To: apmail-jakarta-taglibs-dev-archive@jakarta.apache.org Received: (qmail 35974 invoked by uid 500); 2 Jul 2001 02:06:48 -0000 Mailing-List: contact taglibs-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: taglibs-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list taglibs-dev@jakarta.apache.org Received: (qmail 35963 invoked by uid 500); 2 Jul 2001 02:06:47 -0000 Delivered-To: apmail-jakarta-taglibs-cvs@apache.org Received: (qmail 35953 invoked by uid 1004); 2 Jul 2001 02:06:46 -0000 Date: 2 Jul 2001 02:06:46 -0000 Message-ID: <20010702020646.35952.qmail@apache.org> From: glenn@apache.org To: jakarta-taglibs-cvs@apache.org Subject: cvs commit: jakarta-taglibs/regexp/src/org/apache/taglibs/regexp SplitTag.java glenn 01/07/01 19:06:46 Modified: regexp/src/org/apache/taglibs/regexp SplitTag.java Log: Remove release method, use native types for attributes Revision Changes Path 1.3 +8 -25 jakarta-taglibs/regexp/src/org/apache/taglibs/regexp/SplitTag.java Index: SplitTag.java =================================================================== RCS file: /home/cvs/jakarta-taglibs/regexp/src/org/apache/taglibs/regexp/SplitTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SplitTag.java 2000/11/06 13:54:41 1.2 +++ SplitTag.java 2001/07/02 02:06:45 1.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-taglibs/regexp/src/org/apache/taglibs/regexp/SplitTag.java,v 1.2 2000/11/06 13:54:41 glenn Exp $ - * $Revision: 1.2 $ - * $Date: 2000/11/06 13:54:41 $ + * $Header: /home/cvs/jakarta-taglibs/regexp/src/org/apache/taglibs/regexp/SplitTag.java,v 1.3 2001/07/02 02:06:45 glenn Exp $ + * $Revision: 1.3 $ + * $Date: 2001/07/02 02:06:45 $ * * ==================================================================== * @@ -130,7 +130,6 @@ { private String regexpid = null; private String textid = null; - private String limittext = null; private int limit = -1; private Enumeration split = null; private String value = null; @@ -142,16 +141,6 @@ */ public final int doStartTag() throws JspException { - if( limittext != null ) { - try { - limit = Integer.valueOf(limittext).intValue(); - } catch( NumberFormatException e ) { - throw new JspException( - "regexp tag split limit attribute is not an integer: " + - limittext); - } - } - TextData td = (TextData)pageContext.getAttribute(textid,PageContext.PAGE_SCOPE); if( td == null ) throw new JspException( @@ -206,6 +195,8 @@ */ public final int doEndTag() throws JspException { + if( id != null && id.length() > 0 ) + pageContext.removeAttribute(id,PageContext.PAGE_SCOPE); try { if(bodyContent != null) bodyContent.writeOut(bodyContent.getEnclosingWriter()); @@ -239,11 +230,11 @@ * Set the optional attribute limit to the * number of strings to split out of text. * - * @param String number of strings to limit split to + * @param int number of strings to limit split to */ - public final void setLimit(String str) + public final void setLimit(int limit) { - limittext = str; + this.limit = limit; } /** @@ -257,12 +248,4 @@ return value; } - /** - * Remove the script variable after split tag closed out - */ - public final void release() - { - if( id != null && id.length() > 0 ) - pageContext.removeAttribute(id,PageContext.PAGE_SCOPE); - } }