jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml ParseTag.java
Date Tue, 12 Mar 2002 23:02:50 GMT
shawn       02/03/12 15:02:49

  Modified:    standard/src/org/apache/taglibs/standard/tag/el/xml
                        ParseTag.java
  Log:
  Null/error handling for <x:parse> & EL:  let 'filter' be null.
  
  Revision  Changes    Path
  1.3       +9 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml/ParseTag.java
  
  Index: ParseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml/ParseTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParseTag.java	4 Feb 2002 02:39:51 -0000	1.2
  +++ ParseTag.java	12 Mar 2002 23:02:49 -0000	1.3
  @@ -59,6 +59,7 @@
   import javax.servlet.jsp.tagext.*;
   import org.xml.sax.XMLFilter;
   import org.apache.taglibs.standard.tag.el.core.ExpressionUtil;
  +import org.apache.taglibs.standard.tag.common.core.NullAttributeException;
   import org.apache.taglibs.standard.tag.common.xml.*;
   import org.apache.taglibs.standard.resources.Resources;
   
  @@ -153,7 +154,13 @@
   	    "parse", "xmlText", xmlText_, Object.class, this, pageContext);
   	xmlUrl = (String) ExpressionUtil.evalNotNull(
   	    "parse", "xmlUrl", xmlUrl_, String.class, this, pageContext);
  -	filter = (XMLFilter) ExpressionUtil.evalNotNull(
  -	    "parse", "filter", filter_, XMLFilter.class, this, pageContext);
  +
  +	try {
  +	    filter = (XMLFilter) ExpressionUtil.evalNotNull(
  +	        "parse", "filter", filter_, XMLFilter.class, this, pageContext);
  +	} catch (NullAttributeException ex) {
  +	    // explicitly let 'filter' be null
  +	    filter = null;
  +	}
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message