activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1518: ARTEMIS-1401 Numerical overflow fix whe...
Date Thu, 07 Sep 2017 10:32:10 GMT
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 <nigro.fra@gmail.com>
Date:   2017-09-07T10:25:45Z

    ARTEMIS-1401 Numerical overflow fix when using System::nanoTime

----


---

Mime
View raw message