Java
'this' reference escaped in object construction
Warning
New
Last modified: 03 December 2024 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);
}
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
ThisEscapedInObjectConstruction
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?