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

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

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 7u51
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Description

      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.


        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: