Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 66AA7200B6F for ; Wed, 24 Aug 2016 13:11:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 61A09160AC2; Wed, 24 Aug 2016 11:11:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CE464160AA4 for ; Wed, 24 Aug 2016 13:11:26 +0200 (CEST) Received: (qmail 96970 invoked by uid 500); 24 Aug 2016 11:11:20 -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 96902 invoked by uid 99); 24 Aug 2016 11:11:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2016 11:11:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8DE652C0154 for ; Wed, 24 Aug 2016 11:11:20 +0000 (UTC) Date: Wed, 24 Aug 2016 11:11:20 +0000 (UTC) From: "Mohammad Javad (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-992) NumberUtils#isNumber() returns false for "0.0", "0.4790", et al MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 24 Aug 2016 11:11:42 -0000 [ https://issues.apache.org/jira/browse/LANG-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434717#comment-15434717 ] Mohammad Javad commented on LANG-992: ------------------------------------- I see this issue resolved in version 3.4, I guess correct? > NumberUtils#isNumber() returns false for "0.0", "0.4790", et al > --------------------------------------------------------------- > > Key: LANG-992 > URL: https://issues.apache.org/jira/browse/LANG-992 > Project: Commons Lang > Issue Type: Bug > Components: lang.math.* > Affects Versions: 3.3.1 > Environment: Java 8, Windows 7 > Reporter: Adam Rauch > Fix For: 3.3.2 > > Attachments: LANG-992 Refactor.patch, LANG-992-v2.patch > > > After upgrading from 3.1 to 3.3.1, it seems that {{isNumber(String str)}} returns false for decimal numbers with leading zeros. In other words: > {code:java} > boolean ret = NumberUtils.isNumber("0.4790"); > {code} > On 3.1, {{ret}} was true. In 3.3.1, {{ret}} is false. > Guessing that LANG-972 is related... comment in the code states: > {code:java} > // leading 0, but not hex, must be octal > {code} > This is clearly a case where leading 0 means neither hex nor octal. -- This message was sent by Atlassian JIRA (v6.3.4#6332)