title: Forward compatible Java 6 annotation processor and SupportedSourceVersion
body: <p>I am trying out Java 7 for one project and getting warnings from annotation processors (Bindgen and Hibernate JPA modelgen) of this sort:</p>
  
  <pre><code>warning: Supported source version 'RELEASE_6' from annotation processor 'org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor' less than -source '1.7'
  </code></pre>
  
  <p>This is caused by the <code>@SupportedSourceVersion(SourceVersion.RELEASE_6)</code> annotation on the annotation processor classes. Since they are compiled with Java 6, the highest value of <code>SourceVersion</code> available to them is <code>RELEASE_6</code>. The Java 7 version of <code>SourceVersion</code> introduces <code>RELEASE_7</code>.</p>
  
  <p>My questions: How are annotation processors supposed to handle forward compatibility? Will there have to be separate jdk6 and jdk7 binary versions of them? Am I not understanding something else here?</p>
  
  <p>I only found the following information regarding this concern:</p>
  
  <p><a href="https://bugs.launchpad.net/querydsl/+bug/819861" rel="noreferrer">Querdydsl bug report</a> which used </p>
  
  <pre><code>@Override
  public SourceVersion getSupportedSourceVersion() {
      return SourceVersion.latest();
  }
  </code></pre>
  
  <p><a href="http://blogs.oracle.com/darcy/entry/annotation_processor_sourceversion" rel="noreferrer">Oracle blog</a> in which a commentor recommends supporting latest source version</p>