tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r1026649 - /tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/SetTag.java
Date Sat, 23 Oct 2010 16:54:20 GMT
Author: jboynes
Date: Sat Oct 23 16:54:20 2010
New Revision: 1026649

URL: http://svn.apache.org/viewvc?rev=1026649&view=rev
Log:
clean up null value handling

Modified:
    tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/SetTag.java

Modified: tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/SetTag.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/SetTag.java?rev=1026649&r1=1026648&r2=1026649&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/SetTag.java
(original)
+++ tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/tag/el/core/SetTag.java
Sat Oct 23 16:54:20 2010
@@ -19,7 +19,7 @@ package org.apache.taglibs.standard.tag.
 
 import javax.servlet.jsp.JspException;
 
-import org.apache.taglibs.standard.tag.common.core.NullAttributeException;
+import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
 import org.apache.taglibs.standard.tag.common.core.SetSupport;
 
 /**
@@ -67,26 +67,16 @@ public class SetTag extends SetSupport {
 
     @Override
     protected Object evalValue() throws JspException {
-        try {
-            return ExpressionUtil.evalNotNull("set", "value", valueExpression, Object.class,
this, pageContext);
-        } catch (NullAttributeException ex) {
-            // explicitly let 'value' be null
-            return null;
-        }
+        return ExpressionEvaluatorManager.evaluate("value", valueExpression, Object.class,
this, pageContext);
     }
 
     @Override
     protected Object evalTarget() throws JspException {
-        return ExpressionUtil.evalNotNull("set", "target", targetExpression, Object.class,
this, pageContext);
+        return ExpressionEvaluatorManager.evaluate("target", targetExpression, Object.class,
this, pageContext);
     }
 
     @Override
     protected String evalProperty() throws JspException {
-        try {
-            return (String) ExpressionUtil.evalNotNull("set", "property", propertyExpression,
String.class, this, pageContext);
-        } catch (NullAttributeException ex) {
-            // explicitly let 'property' be null
-            return null;
-        }
+        return (String) ExpressionEvaluatorManager.evaluate("property", propertyExpression,
String.class, this, pageContext);
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message