You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/02/12 23:48:13 UTC
DO NOT REPLY [Bug 6409] New: -
possible bug in org.apache.struts.taglib.logic.CompareTagBase.condition (int, int)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6409>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6409
possible bug in org.apache.struts.taglib.logic.CompareTagBase.condition (int, int)
Summary: possible bug in
org.apache.struts.taglib.logic.CompareTagBase.condition
(int, int)
Product: Struts
Version: 1.0 Final
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Enhancement
Priority: Other
Component: Custom Tags
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: opodisor@websitepros.com
in the case of defined 'name'+'property':
===========
} else if (name != null) {
Object bean = RequestUtils.lookup(pageContext, name, scope);
if (property != null) {
if (bean == null) {
JspException e = new JspException
(messages.getMessage("logic.bean", name));
RequestUtils.saveException(pageContext, e);
throw e;
}
try {
variable = PropertyUtils.getProperty(bean, property);
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
if (t == null)
t = e;
RequestUtils.saveException(pageContext, t);
throw new JspException
(messages.getMessage("logic.property", name, property,
t.toString()));
} catch (Throwable t) {
RequestUtils.saveException(pageContext, t);
throw new JspException
(messages.getMessage("logic.property", name, property,
t.toString()));
}
} else {
variable = bean;
}
} else if (parameter != null) {
===========
if the value returned for the property is null, the tag dies w/ an exception
(variable not defined)
variable = PropertyUtils.getProperty(bean, property);
why can't the bean property value be 'null' ? This does not qualify as
consistency error, so I think the condition should evaluate to false instead of
throwing an exception.
All the other tags (such as <html:text>, etc) work fine w/ null property
values, so why wouldn't this one work also ?
Thanks
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>