Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24E3F17B1A for ; Fri, 3 Oct 2014 18:53:34 +0000 (UTC) Received: (qmail 58553 invoked by uid 500); 3 Oct 2014 18:53:33 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 58434 invoked by uid 500); 3 Oct 2014 18:53:33 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 58421 invoked by uid 99); 3 Oct 2014 18:53:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2014 18:53:33 +0000 Date: Fri, 3 Oct 2014 18:53:33 +0000 (UTC) From: "Daniel Atallah (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BEANUTILS-465) Indexed List Setters no longer work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BEANUTILS-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158357#comment-14158357 ] Daniel Atallah commented on BEANUTILS-465: ------------------------------------------ One solution may be to update the Introspection process so that these indexed list properties instances of "IndexedPropertyDescriptor", then they could be handled separately the way that arrays are. Due to type erasure you'd have to assume a desired type of Object and the conversion magic won't work at all. There really isn't any way around that I can think of, but that isn't really a problem because it's always worked that way. > Indexed List Setters no longer work > ----------------------------------- > > Key: BEANUTILS-465 > URL: https://issues.apache.org/jira/browse/BEANUTILS-465 > Project: Commons BeanUtils > Issue Type: Bug > Components: ConvertUtils & Converters > Affects Versions: 1.9.2 > Reporter: Daniel Atallah > Attachments: BeanUtilsTest.java > > > After upgrading to commons-beanutils 1.9.2 from 1.8.3, I ran into a bug where indexed List setters no longer work. > Per the documentation at: > http://commons.apache.org/proper/commons-beanutils/javadocs/v1.9.2/apidocs/org/apache/commons/beanutils/package-summary.html > " As an extension to the JavaBeans specification, the BeanUtils package considers any property whose underlying data type is java.util.List (or an implementation of List) to be indexed as well." > This no longer appears to be an accurate statement. > The cause appears to be more strict validation in both org.apache.commons.beanutils.converters.StringConverter.convertToType() and in org.apache.commons.beanutils.converters.AbstractConverter. > There is now an explicit cast to the target type, which throws an Exception instead of the previous behavior of simply returning the input value unconverted. > I'll attach a test case that works with 1.8.3, but no longer works with 1.9.2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)