Skip to content

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

@jfschmakeit

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.

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