You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/19 18:30:00 UTC
[jira] [Work logged] (MATH-1647) HaltonSequenceGenerator.skipTo() not throwing proper NotPositiveException
[ https://issues.apache.org/jira/browse/MATH-1647?focusedWorklogId=802106&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-802106 ]
ASF GitHub Bot logged work on MATH-1647:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Aug/22 18:29
Start Date: 19/Aug/22 18:29
Worklog Time Spent: 10m
Work Description: rednikeeg opened a new pull request, #211:
URL: https://github.com/apache/commons-math/pull/211
…PositiveException when index is less than 0
jira issue: https://issues.apache.org/jira/browse/MATH-1647
Issue Time Tracking
-------------------
Worklog Id: (was: 802106)
Remaining Estimate: 0h
Time Spent: 10m
> HaltonSequenceGenerator.skipTo() not throwing proper NotPositiveException
> -------------------------------------------------------------------------
>
> Key: MATH-1647
> URL: https://issues.apache.org/jira/browse/MATH-1647
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6.1
> Reporter: Elia Bertolina
> Priority: Major
> Fix For: 4.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> HaltonSequenceGenerator.skipTo(int index) does not throw a NotPositiveException when the parameter is negative.In the documentation it is stated that an NotPositiveException will be thrown if the parameter value is less than zero.
> However, in this test case:
> {code:java}
> public class HaltonSequenceGenerator_Test{
> public void test() throws Throwable{
> HaltonSequenceGenerator haltonSequenceGenerator = new
> HaltonSequenceGenerator(1);
> try {
> double[] doubleArray =
> haltonSequenceGenerator.skipTo((-4584));
> org.junit.Assert.fail();
> } catch
> (org.apache.commons.math3.exception.NotPositiveException e){
> //NotPositiveException caught and test successful
> }
> }
> } {code}
> The int parameter is negative and a NotPositiveException should be thrown, however the method executes normally, and test case fails.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)