jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-taglibs/regexp/src/org/apache/taglibs/regexp SplitTag.java
Date Mon, 02 Jul 2001 02:06:46 GMT
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 <b>limit</b> 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);
  -    }
   }
  
  
  

Mime
View raw message