-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix adding small Duration to large Instant on JS and Native
When adding a positive Duration < 1 second to an Instant far in the future for which the addition implementation overflows and throws an exception, the catch blocks would only check if the seconds component of the Duration is > 0. However since the Duration is < 1 second, the seconds component is not > 0 and Instant.MIN is returned instead of Instant.MAX. This was fixed by replacing the check against the seconds component of the Duration with a check against the whole Duration like it was already done in the JVM implementation. See #263
- Loading branch information
1 parent
cbbe4b2
commit 5a73782
Showing
3 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters