You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Andrew Janke <fl...@apjanke.net> on 2020/02/15 09:09:11 UTC

Old "RELEASE_7" warnings when using NB 11.2 annotation processors with JDK 11

Hi, NetBeans folks,

I'm working on a project using NetBeans Platform 11.2, compiling it with
OpenJDK 11.0.1, on macOS 11.14, using IntelliJ 2019.3 as my IDE. Here's
my code:
https://github.com/apjanke/antlrworks2-jank/tree/maven-migration. This
is a migration of a project that used to use older versions of NetBeans
and JDK.

There are various @StaticResource, @NonNull, and @NullAllowed
annotations in the source tree, which I think are referring to
annotations defined in org.netbeans.api.annotations.common and various
org.netbeans.modules.* packages.

When I build my project, I get a bunch of warnings like the following:

Warning:java: Supported source version 'RELEASE_7' from annotation
processor
'org.netbeans.api.annotations.common.proc.StaticResourceProcessor' less
than -source '8'
Warning:java: Supported source version 'RELEASE_7' from annotation
processor
'org.netbeans.modules.palette.PaletteItemRegistrationProcessor' less
than -source '8'
Warning:java: Supported source version 'RELEASE_7' from annotation
processor 'org.netbeans.modules.openide.awt.ActionProcessor' less than
-source '8'

Looking at the source for StaticResourceProcessor from the NetBeans 11.2
release, I see this:

@SupportedSourceVersion(SourceVersion.RELEASE_7)
public class StaticResourceProcessor extends AbstractProcessor { ... }

Does that mean these annotations can't or shouldn't be used if I'm
building targeting a higher Java version? Is there a way I can suppress
these warnings if I know the use of these annotations is okay in this
project?

Cheers,
Andrew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists