Java
Declaration access can be weaker
Warning
New
Last modified: 03 December 2024Reports fields, methods or classes that may have their access modifier narrowed down.
Example:
class Sample {
void foo() {
bar("foo", "foo");
}
void bar(String x, String y) { } // can be private
}
After the quick-fix is applied:
class Sample {
void foo() {
bar("foo", "foo");
}
private void bar(String x, String y) { }
}
- 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.
WeakerAccess
Use the inspection's options to define the rules for the modifier change suggestions.
Here you can find the description of settings available for the Declaration access can be weaker inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?