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.

Bug 262630 - Scheduled methods or other methods used by annotation should not be marked as unused
Summary: Scheduled methods or other methods used by annotation should not be marked as...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2016-06-30 11:06 UTC by muellermi
Modified: 2016-06-30 14:22 UTC (History)
0 users

See Also:
Exception Reporter:

IDE log (103.31 KB, text/plain)
2016-06-30 11:06 UTC, muellermi

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2016-06-30 11:06:28 UTC
Product Version = NetBeans IDE Dev (Build 201606300002)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_92
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.92-b14

Reproducibility: Happens every time

If a method is annotated to be used by a framework, e.g Java EE, and is not used from other methods, then NetBeans shows such methods as "unused"


    @Schedule(hour = "*", minute = "*/5", info = "every 5 minutes")
    private void monitorDocumentRoot() {}

    private void init() {}

Expected: NetBeans shall not mark such methods as unused.

By now, this (buggy) behavior is simply annoying.
But thinking of a NetBeans enhancement "remove unused code of file", valueable code would be removed because of a false unused mark
Comment 1 muellermi 2016-06-30 11:06:33 UTC
Created attachment 160202 [details]
IDE log