Search code examples
javaeclipsecompiler-warningseclipse-kepler

eclipse: no warning for unused private methods


Regarding eclipse Kepler SR1

Hi,

I remember that a unused private methods were getting a warning from the compiler.

I don't know if it's changed switching to Kepler (or a previous release) or if it is project settings, because I'm working on a new project where the eclipse settings are shared.

I even couldn't find the setting in the eclipse compiler settings.


Solution

  • go to your project on "Package Explorer", right-click on it and choose "properties". Then inside properties "Java Compiler", "Errors/Warnings". Check the box with "Enable project specific settings". Scroll down to the section where it says "Unnecessary code" and check them to "Warning"