What value for @SuppressWarnings do I use to suppress the "Can be private" warning?

JavaAndroid StudioSuppress Warnings

Java Problem Overview


I keep getting annoyed by the "Can be private" warning, however my FirebaseRecyclerAdapter will not work in that case. So, is there a @SuppressWarnings for that?

What I've tried:

@SuppressWarnings("all") but that's not what I want.

Note: I am using Android Studio

Java Solutions


Solution 1 - Java

It is best to simply disable this inspection, either for your whole project or for a specific class. Put your cursor on the warning and press Alt + Enter to bring up the following menu, which allows you to disable it:

Disable inspection

If you really want to use @SuppressWarnings you can choose the Suppress for class option from the dialog above. This will add the following annotation:

@SuppressWarnings("WeakerAccess")

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAli BdeirView Question on Stackoverflow
Solution 1 - JavaAerusView Answer on Stackoverflow