HDDS-11981. Add annotation for registering feature validator based on a generic version #7603
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Currently the annotation RequestFeatureValidator only works on a binary conditions which could be cumbersome if we want validators to run only for specific older versions. All validators registered would have to perform this redundant version check which could lead to potential bugs (which already exist) if this check is missed somewhere.
This PR looks into adding an annotion & it's corresponding annotation processor which would enable us to add versions while registering a validator. This annotation would not be used anywhere and would be done in a follow up patch.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11981
How was this patch tested?
Existing Unit tests and additional unit tests.