Hi all.
While using Sonarlint and default rules, people in my team started a discussion about RSPEC-1186 and detection of empty private constructors. 1186 marks empty constructors as bug, but for specific cases, like util class with only static methods, it's valid pattern and probably doesn't need more explanations.
Of course you can also add a comment in constructor, but seems that in this pattern it's just adding a useless content and useless content should always be omitted.
/**
* Util class with only static methods, no instances allowed.
*/
public final class FooBar {
private FooBar {
}
public static void foo() {
// any code here
}
public static void bar() {
// any code here
}
}