craigmcc    01/10/03 20:44:17

  Modified:    src/share/org/apache/struts/taglib/html Tag:
                        STRUTS_1_0_BRANCH OptionsTag.java
  Log:
  If the property specified by the "property" attribute returns null,
  throw an error message that indicates what the real problem is, rather
  than causing an NPE.
  
  PR: Bugzilla #3161
  Submitted by: [EMAIL PROTECTED]
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.5   +3 -0      
jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java
  
  Index: OptionsTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java,v
  retrieving revision 1.7.2.4
  retrieving revision 1.7.2.5
  diff -u -r1.7.2.4 -r1.7.2.5
  --- OptionsTag.java   2001/06/10 03:51:41     1.7.2.4
  +++ OptionsTag.java   2001/10/04 03:44:17     1.7.2.5
  @@ -348,6 +348,9 @@
        if (property != null) {
            try {
                collection = PropertyUtils.getProperty(bean, property);
  +                if (collection == null)
  +                    throw new JspException
  +                        (messages.getMessage("getter.property", property));
            } catch (IllegalAccessException e) {
                throw new JspException
                    (messages.getMessage("getter.access", property, name));
  
  
  


Reply via email to