Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8037955

"Supported source version..." warning should be -Xlint aware

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 7u51
    • tools
    • x86_64
    • linux_ubuntu

      A DESCRIPTION OF THE REQUEST :
      Simply refiling #7184902 explicitly as an RFE as requested by Ingrid Yao. The original bug was incorrectly closed due to a misunderstanding of the request.

      References:
      http://bugs.java.com/view_bug.do?bug_id=7184902
      https://netbeans.org/bugzilla/show_bug.cgi?id=210286
      https://github.com/kohsuke/metainf-services/issues/3

      Quick recap of issue: @SupportedSourceVersion(SourceVersion.RELEASE_6) must be used on an annotation processor which should be compiled by JDK 6. Often the processor developer knows that the processor also works with -source 7 (for example), yet does not want to require 7+ to build the processor; since Processor.getSupportedSourceVersion returns an enumeration value rather than a String, there is no way (without using reflection) to specify that. Given that situation, the simplest workaround is to change the existing javac warning about supported source version into a lint warning, so that the user of the annotation can suppress it and have a warning-free build.

      JUSTIFICATION :
      No other clear workaround.


            darcy Joe Darcy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: