Looks good to me!  The best feature of the new code sample is that it not
only prevents overflow in the elapsed time computation, but also overflow
when adding to the timeout, and the latter is far more likely in practice
since users have good reasons to pick Integer.MAX_VALUE and MIN_VALUE as
"infinite" timeouts.  Of course, we paranoid folks know better and think
MAX_VALUE / 2 is plenty infinite enough!

On Mon, Jan 26, 2015 at 4:49 PM, Brian Burkhalter <
brian.burkhal...@oracle.com> wrote:

> Thanks, I think that reads better than the somewhat obscure verbiage we
> were discussing.
>
> It is formalized here:
>
> http://cr.openjdk.java.net/~bpb/8069269/webrev.01/
>
> On Jan 24, 2015, at 9:55 AM, Martin Buchholz <marti...@google.com> wrote:
>
> How about:
>
> --- a/src/java.base/share/classes/java/lang/System.java
> +++ b/src/java.base/share/classes/java/lang/System.java
> @@ -376,19 +376,16 @@
>
>
>

Reply via email to