-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b172
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8181545 | 10 | Daniel Fuchs | P3 | Resolved | Fixed | b11 |
JDK-8181264 | 9.0.4 | Daniel Fuchs | P3 | Resolved | Fixed | b01 |
In JDK 9, the implementation of Clock has been improved to be better
than millisecond in most cases. However, the Javadoc of the "Implementation Note" is now wrong. It says:
"The clock implementation provided here is based on
System.currentTimeMillis(). That method provides little to no
guarantee about the accuracy of the clock. Applications requiring a
more accurate clock must implement this abstract class themselves
using a different external clock, such as an NTP server."
This needs to be updated to match the changes to the implementation.
Suggested replacement text:
"The clock implementation provided here is based on the same
underlying clock as System.currentTimeMillis(), but may have a
precision finer than milliseconds if available. However, little to no
guarantee is provided about the accuracy of the underlying clock.
Applications requiring a more accurate clock must implement this
abstract class themselves using a different external clock, such
as an NTP server."
than millisecond in most cases. However, the Javadoc of the "Implementation Note" is now wrong. It says:
"The clock implementation provided here is based on
System.currentTimeMillis(). That method provides little to no
guarantee about the accuracy of the clock. Applications requiring a
more accurate clock must implement this abstract class themselves
using a different external clock, such as an NTP server."
This needs to be updated to match the changes to the implementation.
Suggested replacement text:
"The clock implementation provided here is based on the same
underlying clock as System.currentTimeMillis(), but may have a
precision finer than milliseconds if available. However, little to no
guarantee is provided about the accuracy of the underlying clock.
Applications requiring a more accurate clock must implement this
abstract class themselves using a different external clock, such
as an NTP server."
- backported by
-
JDK-8181264 Clarify implementation note in Clock.java to match implementation changes made by JDK-8068730
-
- Resolved
-
-
JDK-8181545 Clarify implementation note in Clock.java to match implementation changes made by JDK-8068730
-
- Resolved
-
- relates to
-
JDK-8068730 Increase the precision of the implementation of java.time.Clock.systemUTC()
-
- Closed
-