Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.
This repository was archived by the owner on May 14, 2026. It is now read-only.

Remove final keyword from generated client close() method #650

Description

@jfschmakeit

The generated close() method in the client class should not be final, so that clients can override it as needed.

Context:
The Google Photos Library API client library, extends the generated client library and wraps some additional functionality in its main client class PhotosLibraryClient. In particular, it includes upload functionality that is handled via an internal BackgroundResource that must be cleaned up after use.

Unfortunately, the close() method included in the autogenerated client class (InternalPhotosLibraryClient) is marked as final, which means that we are not able to override it and implement our own close() method.
As proposed in google/java-photoslibrary#40 we are considering manually removing the final keyword from the generated method so that it can be overridden in our client class. Ideally this is something that can be done at the Java microgenerator level, so that we don't have to remove the keyword when the client library is regenerated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions