java.time.Instant.toEpochMilli() fixes

Ported from openjdk8u121

changeset:   11000:2fdb5825ea0a
user:        igerasim
date:        Sat Aug 08 03:25:36 2015 +0300
summary:     8133022: Instant.toEpochMilli() silently overflows

changeset:   10999:492f4fb4a130
user:        igerasim
date:        Sat Aug 08 03:23:52 2015 +0300
summary:     8074032: Instant.ofEpochMilli(millis).toEpochMilli() can throw arithmetic overflow in toEpochMilli()

Test: CtsLibcoreTestCases & CtsLibcoreOjTestCases
Bug: 31028374
Change-Id: If2856c62e60e0cf2330f70e23acecdb23475d5aa
3 files changed