You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2012/06/08 21:36:41 UTC

svn commit: r1348204 - in /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2: BeanProperties.java DefaultBeanProperties.java

Author: simonetripodi
Date: Fri Jun  8 19:36:41 2012
New Revision: 1348204

URL: http://svn.apache.org/viewvc?rev=1348204&view=rev
Log:
added missing getIndexedWriteMethod

Modified:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java?rev=1348204&r1=1348203&r2=1348204&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanProperties.java Fri Jun  8 19:36:41 2012
@@ -102,6 +102,16 @@ public interface BeanProperties<B>
 
     /**
      *
+     * @param propertyName
+     * @return
+     * @throws NoSuchMethodException
+     * @throws IntrospectionException
+     */
+    public abstract Method getIndexedWriteMethod( String propertyName )
+        throws NoSuchMethodException, IntrospectionException;
+
+    /**
+     *
      * @return
      * @throws IntrospectionException
      */

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java?rev=1348204&r1=1348203&r2=1348204&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanProperties.java Fri Jun  8 19:36:41 2012
@@ -148,6 +148,19 @@ final class DefaultBeanProperties<B>
                             beanClass.getName(), propertyName );
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    public Method getIndexedWriteMethod( String propertyName )
+        throws NoSuchMethodException, IntrospectionException
+    {
+        IndexedPropertyDescriptor indexedPropertyDescriptor = getIndexedPropertyDescriptor( propertyName );
+
+        return checkMethod( indexedPropertyDescriptor.getIndexedWriteMethod(),
+                            "Bean of type %s does not provide a getter for indexed property '%s'!",
+                            beanClass.getName(), propertyName );
+    }
+
     private static Method checkMethod( Method method, String errorMessageTemplate, Object...arsg )
         throws NoSuchMethodException
     {