Skip to content
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
gcf-merge-on-green[bot] merged 6 commits into
mainfrom
introduce-java-time
Nov 28, 2024
Merged

gcf-merge-on-green[bot] merged 6 commits into
mainfrom
introduce-java-time

Conversation

@diegomarquezp

Copy link
Copy Markdown
Contributor

This PR introduces java.time alternatives to existing org.threeten.bp.* methods, as well as switching internal variables (if any) to java.time

The 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.time method 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).

@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: datastore Issues related to the googleapis/java-datastore API. labels Nov 19, 2024
@diegomarquezp
diegomarquezp requested a review from lqiu96 November 19, 2024 19:05
@diegomarquezp
diegomarquezp marked this pull request as ready for review November 19, 2024 19:05
@diegomarquezp
diegomarquezp requested review from a team November 19, 2024 19:05

/** Returns the total time to execute the query in the backend. */
public Duration getExecutionDuration() {
public java.time.Duration getExecutionDurationDuration() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see DurationDuration here as well. Hmm, let's see if we can a way to work around this.

@diegomarquezp diegomarquezp Nov 22, 2024