Class-file CLASS-retention annotations (RuntimeInvisibleAnnotations) are not read: SpotBugs @CheckForNull/@NonNull on library members
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Start with ClassSymbolScanner.loadAnnotations and inspect how it reads library member annotations through javac symbols. Compare that result with the class file's RuntimeInvisibleAnnotations for the JnlpConnectionState.getStash example; the issue suggests the JDK ClassFile API or maddi-java-bytecode as entry points. Done means CLASS-retention annotations such as @CheckForNull and @NonNull are included in the nullability analysis.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
ClassSymbolScanner.loadAnnotations reads a library member's annotations through javac's symbols (symbol.getAnnotationMirrors()). Annotations with CLASS retention are stored in a class file's RuntimeInvisibleAnnotations attribute and do not show up there. kotlinc reads them, so Kotlin sees a nullness that maddi's analysis does not.
Example: jenkins remoting's JnlpConnectionState.getStash(Class<S>) carries edu.umd.cs.findbugs.annotations.CheckForNull (RuntimeInvisibleAnnotations, checked with javap).
- kotlinc infers
val state = event.getStash(State::class.java)asState?. - The nullability pass never seeds it: no cause in the jenkins causes run mentions a stapler or remoting annotation, although both use
@CheckForNulland@NonNullwidely.
Effect on the jenkins J2K trial (2026-10-20): DefaultJnlpSlaveReceiver.kt ×6, likely also Channels.kt:50/76 and JnlpSlaveAgentProtocol4.kt:76.
Type-use annotations in RuntimeVisibleTypeAnnotations (JSpecify) are a separate path, now carried by 21b739d11 on ws/maddi-null.
Possible fix: read RuntimeInvisibleAnnotations of a library member from the class file itself, through the JDK ClassFile API or maddi-java-bytecode, and add those annotations next to the visible ones.
🤖 Generated with Claude Code
- Lenguaje dominante
- Java
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 h 58 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CodeLaser/maddi
-
build/ci good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
C# printer: a self-bounded interface's wildcard interface and companion class share a name (CS0102)Abiertofront-end:csharp
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
CodeLaser/maddi#160 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug front-end:javac
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
CodeLaser/maddi#145 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
C# printer: an inner class of a generic class needs the outer type's arguments (Outer<A>.Inner)Abiertofront-end:csharp
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
Los mantenedores suelen responder en 1 día
Todos los issues de CodeLaser/maddi
Issues similares
-
human-required sync-failed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Azure/osdu-spi-file#63 ·
Los mantenedores suelen responder en 1 día
-
frontend quick win
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
CodeForPhilly/benefit-decision-toolkit#571 ·
Los mantenedores suelen responder en 1 día
-
approved
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
checkstyle/checkstyle#22129 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Add Hardcharger JDBC driverPosiblemente ocupada @prmoore77 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día