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.
Created attachment 151553 [details] Example Project Given the attached project, When the installer in Killer1 restores, it only finds one Provider for the interface Installer.Foo instead of the expected 2 with the annotation, one of them is in a method. I think that either: a. It should work or b. The annotation processor of ServiceProvider should raise a compile error if the class in question is in a method or otherwise inaccessible. Just my 10ยข.
I'm sorry, annotation of the local (nested in method) class is not processed by annotation processors, i.e. it is not contained in the set returned from RoundEnvironment.getElementsAnnotatedWith(ServiceProvider.class), so it's not easy to detect that it is used incorrectly. I'm not sure this can be fixed in the near future. Thank you for reporting.