Why is this used to begin with? Is there a Java 7 specific dependency of some type requiring it?
If so does it need to but updated with newer Java equivalents and remove the implied java 7 dependency? For example, in newer Java version they have moved away from previously provided package which where supposed to be more internal used and needed to be migrated to new module public based versions. Eric Bresie [email protected] > On June 5, 2019 at 2:17:47 PM CDT, Jan Lahoda <[email protected]> wrote: > But does removing the annotation really help? Won't it cause more warnings? > Generally, this is not a NetBeans annotation, it is a javac/JDK annotation > and is used by JDK. I guess the options I see are: > -update the annotations to RELEASE_8 > -override the getSupportedSourceVersion() in all the annotation processors > to return javax.lang.model.SourceVersion.lastest(). (Which might mean the > processor will see source code model for new features and behave weird > without any warning whatsoever, but in most cases, this should be OK.) > -try something clever, like inferring the supported source version from the > source level of the module that contains the processor. Not sure if there's > some advantage to that, though. > > Jan > > > On Wed, Jun 5, 2019 at 7:00 PM Brad Walker <[email protected]> wrote: > > > I'm trying to clean up various build warnings.. I need some help/advice on > > one of them. > > > > In particular, we have 3160 cases of the following warning: > > > > [repeat] warning: Supported source version 'RELEASE_7' from annotation > > processor '<java file location here>' less than -source '1.8' > > > > In looking at this in more detail, I noticed the following Annotation is > > causing this warning.. > > > > @SupportedSourceVersion(SourceVersion.RELEASE_7) > > > > This annotation is in 70 different files. > > > > In looking at this closer, it really looks like we are not enforcing the > > use of this annotation. Also, we mandate Java 8 as the minimum supported > > release. > > > > So we either need to update all the files to at least > > SourceVersion.RELEASE_8. But, if we do this, this we will be back to having > > the same warning when compiling using a newer version of Java. Or we could > > just remove the annotation. > > > > My vote is for removing the annotation. It creates a LOT of warnings. The > > NetBeans sources has a lot of places where it completely ignores the > > annotation and just calls into library directly like this: > > > > if (javac.getSourceVersion().compareTo(SourceVersion.RELEASE_7) >= 0) { > > > > Before I put forth the effort to remove the annotation, I wanted to get a > > pulse from the group if this is the right course of action? > > > > I would appreciate any comments/insight that I might be missing.. > > > > Thanks. > > > > -brad w. > >
