Abstract method called during object construction
Reports calls to abstract
methods of the current class during object construction.
A method is called during object construction if it is inside a:
Constructor
Non-static instance initializer
Non-static field initializer
clone()
methodreadObject()
methodreadObjectNoData()
method
Such calls may result in subtle bugs, as object initialization may happen before the method call.
Example:
Locating this inspection
- 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.
AbstractMethodCallInConstructor- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
This inspection shares the functionality with the following inspections:
Overridable method called during object construction
Overridden method called during object construction
Only one inspection should be enabled at once to prevent warning duplication.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 242.22892 |