Skip to content

Conversation

@kaijchen
Copy link
Member

What changes were proposed in this pull request?

Enable setterCanReturnItsClass in checkstyle HiddenField so it will not yield 'fieldName' hides a field error in Builders.

For example:

public Builder setVolumeName(String volumeName) { // not allowed before
  this.volumeName = volumeName;
  return this;
} 

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-6509

How was this patch tested?

Checkstyle

@kaijchen
Copy link
Member Author

CC @adoroszlai for review.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kaijchen for the patch, this is useful.

Checkstyle doc for reference:
https://checkstyle.sourceforge.io/config_coding.html#HiddenField

@kaijchen
Copy link
Member Author

Thanks for review and adding the doc @adoroszlai.

@kaijchen kaijchen deleted the HDDS-6509 branch March 26, 2022 02:26
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 this pull request may close these issues.

2 participants