[
https://issues.apache.org/jira/browse/LANG-1541?focusedWorklogId=511796&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-511796
]
ASF GitHub Bot logged work on LANG-1541:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Nov/20 21:34
Start Date: 14/Nov/20 21:34
Worklog Time Spent: 10m
Work Description: garydgregory commented on pull request #647:
URL: https://github.com/apache/commons-lang/pull/647#issuecomment-727268371
Hm, now that I look at the code, the change is in a deeper method that
returns an index but you are not testing the method you changed, and this is
likely why you did not find the bug in your implementation ;-)
Please see git master for the proper fix and test. I you want to contribute
a Jira and PR for the Float version, that would be most welcome :-)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 511796)
Time Spent: 0.5h (was: 20m)
> ArrayUtils.contains() fails to handle Double.NaN
> ------------------------------------------------
>
> Key: LANG-1541
> URL: https://issues.apache.org/jira/browse/LANG-1541
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.7, 3.10
> Reporter: Anthony Maidment
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> ArrayUtils.contains(double[], double) does not handle Double.NaN correctly.
> That is, ArrayUtils.contains() returns false, even if the given array
> contains Double.NaN.
> For example, consider the following:
> {code:java}
> double[] a = new double[]{Double.NEGATIVE_INFINITY, Double.NaN,
> Double.POSITIVE_INFINITY};
> System.out.println(ArrayUtils.contains(a, Double.POSITIVE_INFINITY)); // true
> System.out.println(ArrayUtils.contains(a, Double.NEGATIVE_INFINITY)); // true
> System.out.println(ArrayUtils.contains(a, Double.NaN)); // false ?
> {code}
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)