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 8A03B200B54 for ; Thu, 28 Jul 2016 14:23:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 88637160A85; Thu, 28 Jul 2016 12:23:51 +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 CFE74160A63 for ; Thu, 28 Jul 2016 14:23:50 +0200 (CEST) Received: (qmail 99776 invoked by uid 500); 28 Jul 2016 12:23:45 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 99395 invoked by uid 99); 28 Jul 2016 12:23:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2016 12:23:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 36174C0C5A for ; Thu, 28 Jul 2016 12:23:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ILmwKSnI1U0y for ; Thu, 28 Jul 2016 12:23:43 +0000 (UTC) Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 34AF65FAC4 for ; Thu, 28 Jul 2016 12:23:43 +0000 (UTC) Received: by mail-qk0-f179.google.com with SMTP id s63so60683180qkb.2 for ; Thu, 28 Jul 2016 05:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:mime-version:subject:date:references:to:in-reply-to; bh=p9+XASA9AQ6DKTrLDz6iTkCJxtua3O9rTR0lyzxPPGg=; b=kBa7B1zil0G4USauuQ/iJei41W97wuITDSvgxToSBWg+Wx9P3/UIpN1DFjBH5Pvz1C Wph4I5sal0wIweZKEmlwob/y/CrdZXmjTNreC6JdGXXUuBhOeJi1HAPECeYUeHpIldBD oZ0GYz2dZMaIToK44MxhgnFUh3EUVz131q+hwFHV3v0haHt7+N7WtuF/pudyggZBhNPd +Mq16W8Rw5is4s/ZxDug46qQ7EI+oIkktUHguSN/G1/4auZjZs9rjbRQoihiexGXMuQK 3REqU8U9tDAiqDpQw8dfHy6F1xNnq4yMwtLxrZIoS8gcxTyprFWkq2Yrb8dgdsB1l5bf +1Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:mime-version:subject:date :references:to:in-reply-to; bh=p9+XASA9AQ6DKTrLDz6iTkCJxtua3O9rTR0lyzxPPGg=; b=TLd6IpDpqgV7HHj6kgI0LyIGTGg6vYuCI+YPGyoj80o7Idsd4EoHxACK7hE3NhSEym lkSBRK2FvmtfJk5JVzcWrqEtjMXdWLHrbLpwXaj9OVAugcYQe1lUJsZTIBVVZRCIF4uc KjzqaDWl4gT7iWz9EvyH+rLg3LCTSI/AeH0Sh11BNlxv4BYE+As2XL+gjG+0vqRyfX9V 7nDD98+Uc9/OSQkvtSaLXXueVWPnKkW8TIjh9DsBcZmcwP06w4y9JEmAJBmt0cmPlCrT r974Ycv/GoTppz/uZg90Z5xuPEggKs12qX2VMnZtr7tgqIXGXJ/H2ljYGi7W9u5j2qYp fXhw== X-Gm-Message-State: AEkoous/LJxtMbbrb+C7K8nz9cTJQUlCT8UfHBmPKn5iJ6bsGXIHcFdlJiojpWM/B8yxQQ== X-Received: by 10.55.64.140 with SMTP id n134mr40763910qka.201.1469708616892; Thu, 28 Jul 2016 05:23:36 -0700 (PDT) Received: from [172.25.152.120] ([199.244.219.64]) by smtp.gmail.com with ESMTPSA id p65sm7131619qke.13.2016.07.28.05.23.35 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jul 2016 05:23:36 -0700 (PDT) From: Rob Tompkins Content-Type: multipart/alternative; boundary="Apple-Mail=_A36CB2D5-905E-48C4-8653-9033786084A9" Message-Id: <4BE74B73-95CD-42F5-AE5A-8E7C6BC15624@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: [LANG] LANG-1252 - NumberUtils.isNumber and NumberUtils.createNumber resolve inconsistently Date: Thu, 28 Jul 2016 08:23:36 -0400 References: <0b4c82e96fcb4a49830913fadbd8c3ae@git.apache.org> To: Commons Developers List In-Reply-To: X-Mailer: Apple Mail (2.3124) archived-at: Thu, 28 Jul 2016 12:23:51 -0000 --Apple-Mail=_A36CB2D5-905E-48C4-8653-9033786084A9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 In short, I=E2=80=99m trying to generalize LANG-1060, LANG-1040, = LANG-1038, and LANG-992 with a single issue that actually hits all the = bases here with NumberUtils.isNumber. Bug (1): System.out.println(lang.math.NumberUtils.isNumber(=E2=80=9C+2=E2=80= =9D)); ----> false while =09 System.out.println(lang.math.NumberUtils.createNumber(=E2=80=9C+2)= ); ----> 2 Bug (2): System.out.println(lang.math.NumberUtils.isNumber(=E2=80=9C01.5=E2= =80=9D)); ----> false while =09 System.out.println(lang.math.NumberUtils.createNumber(=E2=80=9C01.= 5)); ----> 1.5. It seems to me that we could externalize a considerable amount of the = code underlying the two methods into shared methods, as it seems like = all the validations in createNumber that predicate object creation = should be directly used in isNumber. I would love to hear folks=E2=80=99 = thoughts. Cheers, -Rob --Apple-Mail=_A36CB2D5-905E-48C4-8653-9033786084A9--