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: private constructors for util classes and changing places of modifiers #6

Closed

Conversation

bharathkalyans
Copy link
Contributor

This PR handles the warnings of creating a private constructor for util classes and changing final private to private final to maintain code consistency.

@@ -6,6 +6,9 @@
import java.util.regex.Pattern;

public class ClassTypeUtil {

private ClassTypeUtil() {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); in these utility classes can make it more readable.
@artpar your opinion?

@bharathkalyans bharathkalyans changed the title refactor: private constructors for util classes and changing places modifiers refactor: private constructors for util classes and changing places of modifiers Sep 11, 2023
@artpar
Copy link
Contributor

artpar commented Sep 11, 2023

@bharathkalyans Thanks for the PR.

Changes which rearrange the keywords and reformat the code are something which I don't want to accept at this point.

This leaves the 3 changes,

  • Contants.java private constructor
  • fixing of the comment in Unlogged.java
  • ClassTypeUtil.java private constructor

They look fine and I can merge them if you can remove the formatting changes.

@artpar artpar added the good first issue Good for newcomers label Sep 11, 2023
@bharathkalyans
Copy link
Contributor Author

Sure, will create a new PR for this issue solving only the mentioned changes.

@bharathkalyans bharathkalyans deleted the bharathkalyans/issue-#5 branch October 1, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants