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.
Given a standalone module, under 8.0.2 or daily-builds, with a bundle and one source file: package stuff; import org.openide.util.Lookup; public class NewClass { void foo() { Object o = Lookup.getDefault().lookup(Object.class); } } If I do clean&build I get warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.NamedServiceProcessor' less than -source '1.8' 2 warnings Adding the -Werror option and then the build fails of course. I am working on getting rid of all warnings and turning on the -Werror flag. Adding the compiler option -Xlint:-processing doesn't help. But this would only be a workaround anyway. I couldn't find an option to disable this warning. BTW, the code I'm working with is committed to JDK-1.8.
BTW, there's Issue #210286 for the older problem with compiling with JDK-1.7
Issue #210286 has some code for filtering out warnings. Anyone have a pointer handy to how to install/use it? (guess I'm feeling lazy) I don't suppose this will actually get rid of the warning (I still won't be able to turn on -Werror).
In bug 248015 it has been fixed for PatchedPublicProcessor. The same fix should be applied to remaining processors. I was tired waiting for it or filing separate bugs for each module, so I did it by myself and I have rebuild my copy of platform from sources.
This has nothing to do with module system. This should be fixed in lookup module.
@thurka Take a look at the issue I mentioned, Issue #210286 comment# 15. jtulach says ergonomics#c45f8d78f9da bumps supported versions of processors I could find to 7. I will not solve problems compiling on JDK8 in this issue. As you can see, the solution is to fix all the annotation processors throughout the system. I'm re-assigning to you, not because I believe it is your issue (it might be, I have no idea) but because my initial report did not sufficiently indicate the scope of the problem and it is not simply a lookup issue. In my initial report, I just used a minimal example to show the *general* problem. Here's the output from one of my *real* modules. Of course, each module has a different list. Compiling 40 source files to C:\a\src\wb-dev\wb\metawb\build\classes warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.api.annotations.common.proc.StaticResourceProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.projectapi.LookupProviderAnnotationProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.filesystems.declmime.MIMEResolverProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.NbBundleProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.NamedServiceProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.loaders.DataObjectFactoryProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.templates.TemplateProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.awt.ActionProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.editor.mimelookup.CreateRegistrationProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.windows.TopComponentProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.nodes.NodesAnnotationProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.modules.PatchedPublicProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.project.uiapi.CompositeCategoryProviderAnnotationProcessor' less than -source '1.8' warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.project.uiapi.NodeFactoryAnnotationProcessor' less than -source '1.8'
I should have mentioned that the template for the fix now seems to be in Bug 248015 from 6 months ago as @cezariusz mentioned in comment #3. This keeps the annotation tracking, so that regular maintenance is not required. (not in issue Issue #210286 which is from a year ago)
(In reply to err from comment #5) > @thurka > > Take a look at the issue I mentioned, Issue #210286 comment# 15. jtulach > says > ergonomics#c45f8d78f9da bumps supported versions of processors > I could find to 7. I will not solve problems compiling on JDK8 > in this issue. > As you can see, the solution is to fix all the annotation processors > throughout the system. I'm re-assigning to you, not because I believe it is > your issue (it might be, I have no idea) but because my initial report did > not sufficiently indicate the scope of the problem and it is not simply a > lookup issue. I am aware that this need to be fixed in all processors. This needs to be solved case by case - every owner of the annotation processors, should investigate if particular annotation processors works with JDK 8 or not. That's why I assigned it to the first module. After it is fixed in lookup, it can move to the next one and so on. Note that this issue probably will not get much attention until NetBeans build will be switched to JDK 8. Reassigning back to lookup - this issue has nothing to do with Module System, once this is fixed, please assign to next module.
More than a year later, is there any progress on this issue?