Skip to content

Conversation

@sk0x50
Copy link
Contributor

@sk0x50 sk0x50 commented Jun 11, 2023

*/
public class IgniteExceptionUtils {
/** Private constructor to prohibit creating an instance of utility class. */
private IgniteExceptionUtils() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I ask this everyone who writes such code.
Have you ever encounter anyone who tried instantiating utility class? I see these constructors as utterly pointless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, it is an interesting question :)
It looks absolutely reasonable to prohibit an action that does not make any sense. On the other hand, it does not break anything and so, this private constructor can be omitted.

@sk0x50 sk0x50 merged commit cb0fdb7 into apache:main Jun 21, 2023
@sk0x50 sk0x50 deleted the ignite-19535 branch June 21, 2023 13:20
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.

3 participants