Instantiation of utility class

Last modified: Last modified: 18 September 2025

Reports instantiation of utility classes using the new keyword.

In utility classes, all fields and methods are static. Instantiation of such classes is most likely unnecessary and indicates a mistake.

Example:

To prevent utility classes from being instantiated, it's recommended to use a private constructor.