Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 30422 invoked from network); 8 Nov 2006 01:51:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2006 01:51:22 -0000 Received: (qmail 82270 invoked by uid 500); 8 Nov 2006 01:51:29 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 82206 invoked by uid 500); 8 Nov 2006 01:51:29 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 82195 invoked by uid 99); 8 Nov 2006 01:51:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 17:51:29 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 17:51:17 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A66667142F5 for ; Tue, 7 Nov 2006 17:50:57 -0800 (PST) Message-ID: <8993687.1162950657679.JavaMail.jira@brutus> Date: Tue, 7 Nov 2006 17:50:57 -0800 (PST) From: "Henri Yandell (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Commented: (BEANUTILS-187) [beanutils] Methods ConvertUtilsBean.convert could check for converters registered with base classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/BEANUTILS-187?page=comments#action_12448004 ] Henri Yandell commented on BEANUTILS-187: ----------------------------------------- +1 to WONTFIX on this one. Superclass registering is also a pain as people have different views about the order of lookup. Extends first, or interfaces first? Depth first or breadth first? Mostly though it causes too much confusion to the system to have converters who are supertype converters and may or may not offer the subclass (bizarre as that would be). > [beanutils] Methods ConvertUtilsBean.convert could check for converters registered with base classes > ---------------------------------------------------------------------------------------------------- > > Key: BEANUTILS-187 > URL: http://issues.apache.org/jira/browse/BEANUTILS-187 > Project: Commons BeanUtils > Issue Type: Improvement > Components: ConvertUtils & Converters > Environment: Operating System: other > Platform: Other > Reporter: Alexander Borschet > Priority: Minor > > When converting a value to a class instance it is possible tu register user > defined classes that implement the converter interface. > The method convert(String value, Class clazz) in ConvertUtilsBean tries to get > an instance of a converter class simply by checking the collection of registered > converters. > Unfortunately converters that have been registered for super classes are not > considered. > REQUEST: How about improving the method convert by the following code lines: > Class baseclazz = clazz; > Converter converter = null; > do { > converter = (Converter) converters.get(baseclazz); > if (converter != null) > break; > baseclazz = clazz.getSuperclass(); > } while (baseclazz != null); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org