Skip to content
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

refactor: refactor bad smell ProtectedMemberInFinalClass #305

Closed

Conversation

MartinWitt
Copy link

Repairing Code Style Issues

ProtectedMemberInFinalClass

Since final classes cannot be inherited, marking a member as protected may be confusing. It is better to declare such members as private or package-visible instead.

Repairing Code Style Issues

  • ProtectedMemberInFinalClass (2)

Since final classes cannot be inherited, marking a member as protected may be confusing. It is better to declare such members as private or package-visible instead.
@cstamas
Copy link
Member

cstamas commented Jun 24, 2023

Maybe. But opening up their visibility?

@MartinWitt
Copy link
Author

You mean converting them to public? The protected modifier currently does nothing, as these classes are final.

@cstamas
Copy link
Member

cstamas commented Nov 10, 2023

@cstamas cstamas closed this Nov 10, 2023
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