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

Make constructor package protected #22600

Merged
merged 1 commit into from May 1, 2024
Merged

Make constructor package protected #22600

merged 1 commit into from May 1, 2024

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Apr 24, 2024

Description

remove public modifier from constructor of non public class

Motivation and Context

A little easier to understand and reason about the code

Impact

none

Test Plan

ci

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== NO RELEASE NOTE ==

@elharo elharo marked this pull request as ready for review April 25, 2024 14:30
@elharo elharo requested a review from a team as a code owner April 25, 2024 14:30
@tdcmeehan
Copy link
Contributor

@elharo practically, what does this change do? If the class itself is package protected, does it make much of a difference that the constructor is public?

@elharo
Copy link
Contributor Author

elharo commented May 1, 2024

It's a minor clarification. The public modifier has no effect here. Why include additional verbiage that's a no-op? It's unfortunate that IDEs tend to generate code that makes methods public by default.

@elharo elharo merged commit 48d7496 into master May 1, 2024
57 checks passed
@elharo elharo deleted the pack branch May 1, 2024 18:45
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.

None yet

2 participants