telebog
telebog

Reputation: 1896

Warning for public method used just in class

Is there a way to make the IntelliJ Idea inspections or checkstyle to give you a warning when a public method is used only in the class where it is defined?

I had the impression that this was possible a while ago, but in the latest weeks I notice that this is not the case (anymore).

Upvotes: 1

Views: 123

Answers (1)

Daniel
Daniel

Reputation: 4549

In IntelliJ IDEA, it is one of the inspections. "Declaration access can be weaker".

In the Preferences dialog -> Editor -> Inspections -> Java -> Declaration redundancy -> Declaration access can be weaker.

Upvotes: 3

Related Questions