Skip to content

[improve]improve mutable fields should be made private and accessed via suitable methods only#306

Closed
lctking wants to merge 1 commit intoapache:masterfrom
lctking:nullwli
Closed

[improve]improve mutable fields should be made private and accessed via suitable methods only#306
lctking wants to merge 1 commit intoapache:masterfrom
lctking:nullwli

Conversation

@lctking
Copy link
Copy Markdown

@lctking lctking commented Dec 28, 2024

improve : mutable fields should be made private and accessed via suitable methods only

Thanks for your contribution to Apache Commons! Your help is appreciated!

Before you push a pull request, review this list:

  • Read the contribution guidelines for this project.
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible but is a best-practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that commits might be squashed by a maintainer on merge.

@garydgregory
Copy link
Copy Markdown
Member

garydgregory commented Dec 28, 2024

@lctking
-1 You did not follow the instructions, even though you checked the box for "Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself."

@sebbASF
Copy link
Copy Markdown
Contributor

sebbASF commented Dec 28, 2024

-1

I agree that in general it is better to use getters rather than exposing the protected fields, but this will break binary compatibility. Also, it does not make sense to change from protected to public access.

@sebbASF sebbASF closed this Dec 28, 2024
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.

3 participants