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 D7216DFB6 for ; Sun, 19 May 2013 02:47:16 +0000 (UTC) Received: (qmail 64078 invoked by uid 500); 19 May 2013 02:47:16 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 64016 invoked by uid 500); 19 May 2013 02:47:16 -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 64007 invoked by uid 99); 19 May 2013 02:47:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 May 2013 02:47:16 +0000 Date: Sun, 19 May 2013 02:47:16 +0000 (UTC) From: "Calvin Echols (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LANG-693) Method createNumber from NumberUtils doesn't work for floating point numbers other than Float 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/LANG-693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Calvin Echols updated LANG-693: ------------------------------- Attachment: LANG-693.patch This is a patch that resolves this bug. Any feedback would be greatly appreciated! > Method createNumber from NumberUtils doesn't work for floating point numbers other than Float > --------------------------------------------------------------------------------------------- > > Key: LANG-693 > URL: https://issues.apache.org/jira/browse/LANG-693 > Project: Commons Lang > Issue Type: Bug > Components: lang.math.* > Affects Versions: 2.6 > Reporter: Carlos Rego > Priority: Minor > Fix For: 3.x > > Attachments: LANG-693.patch > > > Method createNumber from NumberUtils is trying to parse a string with a floating point number always first as a Float, that will cause that if we send a string with a number that will need a Double or even a BigDecimal the number will be truncate to accommodate into the Float without an exception to be thrown, so in fact we will no be returning ever neither a Double nor a BigDecimal. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira