Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95B5F92EF for ; Fri, 8 Jun 2012 19:37:05 +0000 (UTC) Received: (qmail 99344 invoked by uid 500); 8 Jun 2012 19:37:05 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 99280 invoked by uid 500); 8 Jun 2012 19:37:05 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 99272 invoked by uid 99); 8 Jun 2012 19:37:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 19:37:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 19:37:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0F5EF2388865 for ; Fri, 8 Jun 2012 19:36:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1348204 - in /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2: BeanProperties.java DefaultBeanProperties.java Date: Fri, 08 Jun 2012 19:36:41 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120608193642.0F5EF2388865@eris.apache.org> 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 /** * + * @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 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 {