-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
None
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8205256 | 11.0.1 | Doug Lea | P4 | Resolved | Fixed | team |
Converting from Duration to TimeUnit is surprisingly difficult to get right (if we want saturating behavior on overflow, which we almost always want in java.util.concurrent), and should be provided to encourage users to store durations in Durations.
If users want ArithmeticException on overflow, then e.g. the existing Duration#toNanos should suffice.
https://openjdk.markmail.org/thread/ndcwjnmbpwhkvkwe
If users want ArithmeticException on overflow, then e.g. the existing Duration#toNanos should suffice.
https://openjdk.markmail.org/thread/ndcwjnmbpwhkvkwe
- backported by
-
JDK-8205256 Add TimeUnit#convert(Duration)
-
- Resolved
-
- csr for
-
JDK-8204376 Add TimeUnit#convert(Duration)
-
- Closed
-