[
https://issues.apache.org/jira/browse/ARTEMIS-1401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16156792#comment-16156792
]
ASF GitHub Bot commented on ARTEMIS-1401:
-----------------------------------------
GitHub user franz1981 opened a pull request:
https://github.com/apache/activemq-artemis/pull/1518
ARTEMIS-1401 Numerical overflow fix when using System::nanoTime
Quoting the
[javadoc](https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#nanoTime--):
> To compare two nanoTime values
>
> long t0 = System.nanoTime();
> ...
> long t1 = System.nanoTime();
> one should use t1 - t0 < 0, not t1 < t0, because of the possibility of
numerical overflow.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/franz1981/activemq-artemis
nano_time_compare_overflow
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/1518.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1518
----
commit 11096684b8fc10785d6dd12fe1353ce109b0e128
Author: Francesco Nigro <[email protected]>
Date: 2017-09-07T10:25:45Z
ARTEMIS-1401 Numerical overflow fix when using System::nanoTime
----
> Numerical overflow fix when using System::nanoTime
> --------------------------------------------------
>
> Key: ARTEMIS-1401
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1401
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)