This repository was archived by the owner on Feb 24, 2026. It is now read-only.
feat: introduce java.time methods and variables - #1671
Merged
Merged
Conversation
lqiu96
reviewed
Nov 22, 2024
|
|
||
| /** Returns the total time to execute the query in the backend. */ | ||
| public Duration getExecutionDuration() { | ||
| public java.time.Duration getExecutionDurationDuration() { |
Member
There was a problem hiding this comment.
Oh I see DurationDuration here as well. Hmm, let's see if we can a way to work around this.
This PR introduces
java.timealternatives to existingorg.threeten.bp.*methods, as well as switching internal variables (if any) tojava.timeThe main constraint is to keep the changes backwards compatible, so for each existing threeten method "
method1(org.threeten.bp.Duration)" we will add an alternative with a Duration (or Timestamp when applicable) suffix: "method1Duration(java.time.Duration)".For most cases, the implementation will be held in the
java.timemethod and the old threeten method will just delegate the call to it. However, for the case of abstract classes, the implementation will be kept in the threeten method to avoid breaking changes (i.e. users that already overloaded the method in their user code).