craigmcc 01/06/09 21:12:53
Modified: src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
RequestUtils.java
Log:
Check for a missing bean before checking for property=null. This way, the
documented JspException will be thrown if the bean is not found.
PR: Bugzilla #2088
Submitted by: [EMAIL PROTECTED]
Revision Changes Path
No revision
No revision
1.14.2.3 +6 -6
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
Index: RequestUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
retrieving revision 1.14.2.2
retrieving revision 1.14.2.3
diff -u -r1.14.2.2 -r1.14.2.3
--- RequestUtils.java 2001/06/01 20:21:40 1.14.2.2
+++ RequestUtils.java 2001/06/10 04:12:52 1.14.2.3
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.2
2001/06/01 20:21:40 craigmcc Exp $
- * $Revision: 1.14.2.2 $
- * $Date: 2001/06/01 20:21:40 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.3
2001/06/10 04:12:52 craigmcc Exp $
+ * $Revision: 1.14.2.3 $
+ * $Date: 2001/06/10 04:12:52 $
*
* ====================================================================
*
@@ -95,7 +95,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.14.2.2 $ $Date: 2001/06/01 20:21:40 $
+ * @version $Revision: 1.14.2.3 $ $Date: 2001/06/10 04:12:52 $
*/
public class RequestUtils {
@@ -489,14 +489,14 @@
// Look up the requested bean, and return if requested
Object bean = lookup(pageContext, name, scope);
- if (property == null)
- return (bean);
if (bean == null) {
JspException e = new JspException
(messages.getMessage("lookup.bean", name, scope));
saveException(pageContext, e);
throw e;
}
+ if (property == null)
+ return (bean);
// Locate and return the specified property
try {