From 21c041dcc39c350304e9e4904423af4e17f56211 Mon Sep 17 00:00:00 2001 From: Alex Cook Date: Fri, 16 Jan 2026 14:37:04 -0500 Subject: [PATCH] feat: change AnnotatedFor retention policy to RUNTIME --- .../org/checkerframework/framework/qual/AnnotatedFor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/org/checkerframework/framework/qual/AnnotatedFor.java b/src/java.base/share/classes/org/checkerframework/framework/qual/AnnotatedFor.java index 48c4f7ab47f..200474664bb 100644 --- a/src/java.base/share/classes/org/checkerframework/framework/qual/AnnotatedFor.java +++ b/src/java.base/share/classes/org/checkerframework/framework/qual/AnnotatedFor.java @@ -16,7 +16,7 @@ * using it in a fully-annotated library nor in an application that does not export APIs for * clients. * - *

This annotation has no effect unless the {@code + *

This annotation is retained in bytecode but has no effect unless the {@code * -AuseConservativeDefaultsForUncheckedCode=source} command-line argument is supplied. Ordinarily, * the {@code -AuseConservativeDefaultsForUncheckedCode=source} command-line argument causes * unannotated locations to be defaulted using conservative defaults, and it suppresses all @@ -26,7 +26,7 @@ * @checker_framework.manual #compiling-libraries Compiling partially-annotated libraries */ @Documented -@Retention(RetentionPolicy.SOURCE) +@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.PACKAGE}) public @interface AnnotatedFor { /**