-
Notifications
You must be signed in to change notification settings - Fork 136
IGNITE-19535 Removed a requirement to have a special constructor for Ignite exceptions #2178
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
Conversation
| */ | ||
| public class IgniteExceptionUtils { | ||
| /** Private constructor to prohibit creating an instance of utility class. */ | ||
| private IgniteExceptionUtils() { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java
Outdated
Show resolved
Hide resolved
modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java
Outdated
Show resolved
Hide resolved
modules/api/src/main/java/org/apache/ignite/lang/IgniteExceptionUtils.java
Show resolved
Hide resolved
…py Ignite exceptions
https://issues.apache.org/jira/browse/IGNITE-19535