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/core OutTag.java
Date Tue, 30 Apr 2002 02:26:23 GMT
shawn       02/04/29 19:26:23

  Modified:    standard/src/org/apache/taglibs/standard/tag/common/core
                        OutSupport.java
               standard/src/org/apache/taglibs/standard/tag/el/core
                        OutTag.java
  Log:
  Bug fix for <c:out>
  
  Revision  Changes    Path
  1.5       +2 -6      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/OutSupport.java
  
  Index: OutSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/OutSupport.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OutSupport.java	29 Apr 2002 19:28:30 -0000	1.4
  +++ OutSupport.java	30 Apr 2002 02:26:23 -0000	1.5
  @@ -119,13 +119,9 @@
       // evaluates 'value' and determines if the body should be evaluted
       public int doStartTag() throws JspException {
         try {
  -	Object result;
  -
  -	result = value;
  -
   	// print value if available; otherwise, try 'default'
  -	if (result != null) {
  -            out(pageContext, escapeXml, result.toString());
  +	if (value != null) {
  +            out(pageContext, escapeXml, value.toString());
   	    return SKIP_BODY;
   	} else {
   	    // if we don't have a 'default' attribute, just go to the body
  
  
  
  1.4       +9 -5      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/OutTag.java
  
  Index: OutTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/OutTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OutTag.java	18 Apr 2002 01:57:49 -0000	1.3
  +++ OutTag.java	30 Apr 2002 02:26:23 -0000	1.4
  @@ -133,16 +133,20 @@
   
       /* Evaluates expressions as necessary */
       private void evaluateExpressions() throws JspException {
  -	value = null;
   	try {
   	    value = ExpressionUtil.evalNotNull(
   	        "out", "value", value_, Object.class, this, pageContext);
  -	} catch (Exception ex) {
  -	    // explicitly allow 'null' for value and mask other errors per spec
  +	} catch (NullAttributeException ex) {
  +	    // explicitly allow 'null' for value
   	    value = null;
   	}
  -	def = (String) ExpressionUtil.evalNotNull(
  -	    "out", "default", default_, String.class, this, pageContext);
  +	try { 
  +	    def = (String) ExpressionUtil.evalNotNull(
  +	        "out", "default", default_, String.class, this, pageContext);
  +	} catch (NullAttributeException ex) {
  +	    // explicitly allow 'null' for def
  +	    def = null;
  +	}
   	escapeXml = true;
   	Boolean escape = ((Boolean) ExpressionUtil.evalNotNull(
   	    "out", "escapeXml", escapeXml_, Boolean.class, this, pageContext));
  
  
  

--
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