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 ED4AE18671 for ; Mon, 17 Aug 2015 11:33:01 +0000 (UTC) Received: (qmail 72345 invoked by uid 500); 17 Aug 2015 11:32:46 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 72234 invoked by uid 500); 17 Aug 2015 11:32:45 -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 72223 invoked by uid 99); 17 Aug 2015 11:32:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2015 11:32:45 +0000 Date: Mon, 17 Aug 2015 11:32:45 +0000 (UTC) From: "Gilles (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (MATH-1256) Interval class upper and lower check 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/MATH-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gilles resolved MATH-1256. -------------------------- Resolution: Fixed Fix Version/s: 3.6 4.0 Thanks for the report. Boundary check added in the following commits: 41f297809965523fcd021bef20b304b3584d9b4f (4.0) eb8727f9c64f286d44bbcc1d19f96408ea5a385c (3.6) > Interval class upper and lower check > ------------------------------------ > > Key: MATH-1256 > URL: https://issues.apache.org/jira/browse/MATH-1256 > Project: Commons Math > Issue Type: Bug > Reporter: Gunel Jahangirova > Priority: Minor > Fix For: 4.0, 3.6 > > > In class Interval, which is in the package org.apache.commons.math4.geometry.euclidean.oned it is possible to pass the value for variable upper less than the value of variable lower, which is logically incorrect and also causes the method getSize() to return negative value. > For example: > @Test > public void test1() throws Throwable { > Interval interval0 = new Interval(0.0, (-1.0)); > double double0 = interval0.getSize(); > assertEquals((-1.0), double0, 0.01D); > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)