I'm wondering about the following block of code, the entire body of
"ExpressionUtil.evalNotNull()":

-----------
        if (expression != null) {
            Object r = ExpressionEvaluatorManager.evaluate(
                attributeName, expression, expectedType, tag, pageContext);
            if (r == null)
                throw new NullAttributeException(tagName, attributeName);
            return r;
        } else
            return null;
-----------

In particular, I see that the NullAttributeException is thrown if the
expression string was not null, but the resulting value was null.  However, if
the expression string was null, it just returns null.  Shawn, could you explain
the motivation for this?  I'm wondering why it doesn't throw the NAE if the
expression string was null.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to