adoroszlai opened a new pull request, #7423:
URL: https://github.com/apache/ozone/pull/7423
## What changes were proposed in this pull request?
Remove suppression of `HiddenField` checkstyle rule, currently only used for
`Builder` classes.
Checkstyle is already configured to ignore `HiddenField` for "setter"
methods. However,
> [a] method is recognized as a setter if it is in the following form
> `${returnType} set${Name}(${anyType} ${name})`
> where ... `${name}` is name of the variable that is being set and
`${Name}` its capitalized form that appears in the method name.
> https://checkstyle.org/checks/coding/hiddenfield.html
So we need to make sure to follow naming conventions:
- parameter name must match method name
- method name must be `set...`, not `with...`
(We could also avoid the violation by renaming parameters to something like
`newValue`.)
In some classes suppression was completely unnecessary.
https://issues.apache.org/jira/browse/HDDS-11684
## How was this patch tested?
CI:
https://github.com/adoroszlai/ozone/actions/runs/11793288532
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]