'this' reference escaped in object construction
Reports possible escapes of this
during the object initialization. The escapes occur when this
is used as a method argument or an object of assignment in a constructor or initializer. Such escapes may result in subtle bugs, as the object is now available in the context where it is not guaranteed to be initialized.
Example:
class Foo {
{
System.out.println(this);
}
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023