From 4635e5eb81df475d00c285ef50103febe6815808 Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Wed, 8 Jul 2026 10:47:19 +0530 Subject: [PATCH] fix(java): processor advertises latest supported source version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @SupportedSourceVersion(RELEASE_11) warned when compiling at -source 17. Override getSupportedSourceVersion() with latestSupported() — the processor reads annotations structurally, so it's version-agnostic. --- .../byteveda/taskito/processor/TaskHandlerProcessor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sdks/java/processor/src/main/java/org/byteveda/taskito/processor/TaskHandlerProcessor.java b/sdks/java/processor/src/main/java/org/byteveda/taskito/processor/TaskHandlerProcessor.java index 8b0a9567..dad14bda 100644 --- a/sdks/java/processor/src/main/java/org/byteveda/taskito/processor/TaskHandlerProcessor.java +++ b/sdks/java/processor/src/main/java/org/byteveda/taskito/processor/TaskHandlerProcessor.java @@ -9,7 +9,6 @@ import javax.annotation.processing.AbstractProcessor; 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; @@ -29,13 +28,19 @@ * needs no dependency on the runtime module. */ @SupportedAnnotationTypes(TaskHandlerProcessor.ANNOTATION) -@SupportedSourceVersion(SourceVersion.RELEASE_11) public final class TaskHandlerProcessor extends AbstractProcessor { static final String ANNOTATION = "org.byteveda.taskito.annotation.TaskHandler"; static final String RESOURCE = "org.byteveda.taskito.annotation.Resource"; static final String COMPRESSED = "org.byteveda.taskito.annotation.Compressed"; static final String ENCRYPTED = "org.byteveda.taskito.annotation.Encrypted"; + // Accept whatever the compiler runs at, so building at -source 17+ doesn't warn + // that the processor caps out below it (structural read, version-agnostic). + @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latestSupported(); + } + @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { TypeElement marker = processingEnv.getElementUtils().getTypeElement(ANNOTATION);