Skip to content

Favor Composition in CompareFilter #1060

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
jzheaux opened this issue Apr 9, 2025 · 0 comments
Closed

Favor Composition in CompareFilter #1060

jzheaux opened this issue Apr 9, 2025 · 0 comments

Comments

@jzheaux
Copy link
Collaborator

jzheaux commented Apr 9, 2025

CompareFilter uses a combination of composition and inheritance that implicitly encourages changing the object's behavior after construction time.

We can clean this up by deprecating getCompareString and getEncodedValue and requiring those in a protected constructor. In this way, all the data that CompareFilter needs is in final fields.

@jzheaux jzheaux self-assigned this Apr 9, 2025
@jzheaux jzheaux added this to the 3.3.0-RC1 milestone Apr 9, 2025
@jzheaux jzheaux closed this as completed in 47be984 Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant