Skip to content

Methods such as withOnUpdateFilter should accept super types #1938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shawkins opened this issue Jun 12, 2023 · 1 comment · Fixed by #1940
Closed

Methods such as withOnUpdateFilter should accept super types #1938

shawkins opened this issue Jun 12, 2023 · 1 comment · Fixed by #1940
Assignees

Comments

@shawkins
Copy link
Collaborator

This is just a minor enhancement request. Filters may be valid against just HasMetadata (or some other parent type) and not require the specific subtype.

@csviri csviri self-assigned this Jun 12, 2023
@shawkins
Copy link
Collaborator Author

For example on an Informer to add an event handler:

SharedIndexInformer<T> addEventHandler(ResourceEventHandler<? super T> handler)

This allows you to have an event handler that is general to HasMetadata (or whatever else may be in your hierarchy) and use it without additional typing for multiple resource classes.

@csviri csviri linked a pull request Jun 13, 2023 that will close this issue
@csviri csviri closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants