This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
For a POJO as: @Path("movies") public class MovieResource { List<Movie> movies; @PostConstruct private void init() { // ... } There is a squiggly line under the method name "init" with the pop up saying "Method init() is not used.". This method is not meant to be invoked by the application class and instead is a lifecycle call back method. The squiggly line should not be shown.
Is it Java module itself which provides "Method {name} is not used." hint? Is there any way to prevent that hint from appearing in conditions described in this issue? Maybe hint should not be shown if a private method has some annotation as annotation indicates the method has some purpose?
The long term idea is to add an API that would allow code that supports such frameworks mark some methods as used. Marking each method that has an annotation as used would not work very well, IMO - consider e.g. @SuppressWarnings. *** This bug has been marked as a duplicate of bug 176240 ***