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 some of the Java classes in module-websubhub proper utility classes #4910

Closed
vil02 opened this issue Oct 11, 2023 · 0 comments · Fixed by ballerina-platform/module-ballerina-websubhub#894

Comments

@vil02
Copy link

vil02 commented Oct 11, 2023

Description:

Some of the Java classes in websubhub module, namely:

appear to be utility classes (i.e. all of the members and methods are static). Generally speaking it is a good practice to:

  • explicitly mark their default constructor as private (like in ModuleUtils) - because it does not make sense to have objects of such classes,
  • mark such classes as final - because it does not make sense to derive any class from them.

There are benefits of doing this:

  • the design is cleaner - e.g. no one will create objects of such classes,
  • the coverage report will show higher/more accurate coverage (currently it is complying that instantiation of these classes is not tested).

Suggested Labels:

module/websubhub,hacktoberfest

Suggested Assignees:

@vil02

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

#4894, #4901, #4902.

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 a pull request may close this issue.

1 participant