jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core SetSupport.java
Date Thu, 18 Apr 2002 01:22:22 GMT
shawn       02/04/17 18:22:22

  Modified:    standard/src/org/apache/taglibs/standard/resources
                        Resources.properties
               standard/src/org/apache/taglibs/standard/tag/common/core
                        SetSupport.java
  Log:
  Addresses bug 8233.
  
  Revision  Changes    Path
  1.25      +3 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Resources.properties	17 Apr 2002 21:21:24 -0000	1.24
  +++ Resources.properties	18 Apr 2002 01:22:22 -0000	1.25
  @@ -71,6 +71,9 @@
   SET_BAD_SCOPE=\
       Invalid "scope" attribute for <set>:  "{0}"
   
  +SET_INVALID_PROPERTY=\
  +    Invalid property in <set>:  "{0}"
  +
   SET_NO_VALUE=\
       Need either non-whitespace body or "value" attribute in <set>
   
  
  
  
  1.2       +11 -2     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/SetSupport.java
  
  Index: SetSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/SetSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SetSupport.java	17 Apr 2002 14:54:12 -0000	1.1
  +++ SetSupport.java	18 Apr 2002 01:22:22 -0000	1.2
  @@ -160,10 +160,19 @@
                       PropertyDescriptor pd[] =
                           Introspector.getBeanInfo(target.getClass())
   			    .getPropertyDescriptors();
  -                    for (int i = 0; i < pd.length; i++)
  -                        if (pd[i].getName().equals(property))
  +		    boolean succeeded = false;
  +                    for (int i = 0; i < pd.length; i++) {
  +                        if (pd[i].getName().equals(property)) {
   			    pd[i].getWriteMethod().invoke(target,
   			        new Object[] { result });
  +			    succeeded = true;
  +			}
  +		    }
  +		    if (!succeeded) {
  +			throw new JspTagException(
  +			    Resources.getMessage("SET_INVALID_PROPERTY",
  +				property));
  +		    }
   		} catch (IllegalAccessException ex) {
   		    throw new JspException(ex);
   		} catch (IntrospectionException ex) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message