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

Clarify Utils Class instantiation #153

Open
1 task done
Jonathan-Zollinger opened this issue Aug 20, 2024 · 0 comments
Open
1 task done

Clarify Utils Class instantiation #153

Jonathan-Zollinger opened this issue Aug 20, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request sonar-cloud mirror of sonar cloud issue

Comments

@Jonathan-Zollinger
Copy link
Member

Jonathan-Zollinger commented Aug 20, 2024

Summary

because the utils class shouldn't be instantiated, any attempt to instantiate it should be met with an error.

Proposed Solution

override the default constructor with an error statement. ie

...

private Utils() {
  throw new IllegalStateException("Utility class");
}

...

Alternative

N/A

Requirements

  • [] automated test validates instantiating utils class throws an error
  • [] if not tested, add tests validating documented behavior

Additional Context

sonarcloud

Code of Conduct

@Jonathan-Zollinger Jonathan-Zollinger added the enhancement New feature or request label Aug 20, 2024
@Jonathan-Zollinger Jonathan-Zollinger self-assigned this Aug 20, 2024
@Jonathan-Zollinger Jonathan-Zollinger added the sonar-cloud mirror of sonar cloud issue label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sonar-cloud mirror of sonar cloud issue
Projects
None yet
Development

No branches or pull requests

1 participant