Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 24796 invoked from network); 2 Apr 2007 13:54:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2007 13:54:55 -0000 Received: (qmail 47632 invoked by uid 500); 2 Apr 2007 13:55:00 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 47538 invoked by uid 500); 2 Apr 2007 13:55:00 -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 47511 invoked by uid 99); 2 Apr 2007 13:55:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2007 06:55:00 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Mon, 02 Apr 2007 06:54:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 67D16714049 for ; Mon, 2 Apr 2007 06:54:32 -0700 (PDT) Message-ID: <8532208.1175522072421.JavaMail.jira@brutus> Date: Mon, 2 Apr 2007 06:54:32 -0700 (PDT) From: "Xianmin Kwauk (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Created: (BEANUTILS-274) BeanUtils cannot set property of type Long with value of Double MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org BeanUtils cannot set property of type Long with value of Double --------------------------------------------------------------- Key: BEANUTILS-274 URL: https://issues.apache.org/jira/browse/BEANUTILS-274 Project: Commons BeanUtils Issue Type: Bug Components: Bean / Property Utils, ConvertUtils & Converters Affects Versions: 1.7.0 Environment: Windows XP, JDK 1.6.0 Reporter: Xianmin Kwauk I tried to set a field of type Long with a double value (e.g. 100.0) and I got 0. In BeanUtilsBean, in the following code: } else if (getConvertUtils().lookup(value.getClass()) != null) { newValue = getConvertUtils().convert(value.toString(), type); } else { value.toString() is passed to LongConverter which would handle value (Double) correctly but fails when a String (e.g. "100.0") is passed in. It seems changing "value.toString()" to "value" should fix the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org