Java
'clone()' method not 'public'
Warning
New
Last modified: 03 December 2024 Reports clone()
methods that are protected
and not public
.
When overriding the clone()
method from java.lang.Object
, it is expected to make the method public
, so that it is accessible from non-subclasses outside the package.
- 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.
NonPublicClone
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?