Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 26296 invoked from network); 23 Aug 2009 02:41:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Aug 2009 02:41:57 -0000 Received: (qmail 67384 invoked by uid 500); 23 Aug 2009 00:55:39 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 67263 invoked by uid 500); 23 Aug 2009 00:55:39 -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 67253 invoked by uid 99); 23 Aug 2009 00:55:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Aug 2009 00:55:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Aug 2009 00:55:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CEB32234C004 for ; Sat, 22 Aug 2009 17:55:14 -0700 (PDT) Message-ID: <877412766.1250988914833.JavaMail.jira@brutus> Date: Sat, 22 Aug 2009 17:55:14 -0700 (PDT) From: "Niall Pemberton (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (BEANUTILS-347) MappedPropertyDescriptor throws an exception after method reference has been garbage collected In-Reply-To: <469166189.1240985490479.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/BEANUTILS-347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niall Pemberton resolved BEANUTILS-347. --------------------------------------- Resolution: Fixed Fix Version/s: 1.8.1 Assignee: Niall Pemberton Hi, thanks for the test case. I agree with your comment about the first parameter not being a String for a write method, but I'm reluctant to change existing behaviour. I have fixed this so that the method is found after garbage collection http://svn.apache.org/viewvc?view=rev&revision=806915 > MappedPropertyDescriptor throws an exception after method reference has been garbage collected > ---------------------------------------------------------------------------------------------- > > Key: BEANUTILS-347 > URL: https://issues.apache.org/jira/browse/BEANUTILS-347 > Project: Commons BeanUtils > Issue Type: Bug > Components: Bean / Property Utils > Affects Versions: 1.8.0 > Reporter: Eickvonder > Assignee: Niall Pemberton > Fix For: 1.8.1 > > Attachments: Jira347TestCase.java > > > If a bean contains a method > setAnyMapped(anyTypeButString,anyType) > without a corresponding getter the first calls to getMappedWriteMethod return the corresponding method, but if the soft reference to the method has been garbage collected the runtime exception 'Method ... for ... could not be reconstructed - method not found" is thrown. > First of all I think it is a bug that getMappedWriteMethod is not invariant in its behaviour concerning garbage collection (at least it should not throw an exception in this case), but secondly I wonder if it is correct at all that constructing a MappedPropertyDescriptor is possible though the first parameter is not of type String. But this "odd" behaviour is actually tested within MappedPropertyTestCase.testAnyArgsProperty(). > For me I would be fine if either construction of MappedPropertyDescriptor would fail or getMappedWriteMethod would return null or the method in both cases before and after garbage collection. The only thing that breaks my app is the exception being thrown as this is not catched within my call of BeanUtils.populate. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.