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-email proper utility classes #4918

Closed
vil02 opened this issue Oct 12, 2023 · 0 comments · Fixed by ballerina-platform/module-ballerina-email#726

Comments

@vil02
Copy link

vil02 commented Oct 12, 2023

Description:

Some of the Java classes in email 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/email,hacktoberfest

Suggested Assignees:

@vil02

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

#4894, #4901, #4902, #4910, #4911.

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