Inspectopedia
 
2024.3

New instance of class annotated with @groovy.lang.Singleton

Warning
Sanity
New
Last modified: 03 December 2024

Reports new instance creation of classes annotated with @groovy.lang.Singleton. Such constructions can lead to runtime exception Can't instantiate singleton.

Example:

After the quick-fix is applied: