Commit 3cd40e24 authored by Phillip Webb's avatar Phillip Webb

Update getSupportedSourceVersion() logic

Use SourceVersion.latestSupported() rather than @SupportedSourceVersion
since we might build with an earlier JDK.

Fixes gh-2302
parent 4c6907d5
......@@ -34,7 +34,6 @@ import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
......@@ -66,7 +65,6 @@ import org.springframework.boot.configurationprocessor.metadata.JsonMarshaller;
* @since 1.2.0
*/
@SupportedAnnotationTypes({ "*" })
@SupportedSourceVersion(SourceVersion.RELEASE_8)
public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor {
static final String CONFIGURATION_PROPERTIES_ANNOTATION = "org.springframework.boot."
......@@ -101,6 +99,11 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
return NESTED_CONFIGURATION_PROPERTY_ANNOTATION;
}
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}
@Override
public synchronized void init(ProcessingEnvironment env) {
super.init(env);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment