Inspectopedia Help

@Singleton constructors

Reports constructors of classes annotated by @Singleton unless it is declared non-strict.

Example:

@Singleton class Foo{ Foo(){ } }

There are two possible quick-fixes: either to remove the constructor or to declare @Singleton non-strict.

After the quick-fix is applied:

@Singleton class Foo{ }

or:

@Singleton(strict = false) class Foo{ Foo(){ } }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Groovy, 233.SNAPSHOT

Last modified: 13 July 2023