Class-file CLASS-retention annotations (RuntimeInvisibleAnnotations) are not read: SpotBugs @CheckForNull/@NonNull on library members
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Java
- スター
- 1
- フォーク
- 1
- 平均マージ
- 1時間 58分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeLaser/maddi のほかの issue
-
build/ci good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
C# printer: a self-bounded interface's wildcard interface and companion class share a name (CS0102)オープン
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
CodeLaser/maddi#160 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug front-end:javac
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
CodeLaser/maddi#145 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
C# printer: an inner class of a generic class needs the outer type's arguments (Outer<A>.Inner)オープンfront-end:csharp
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
CodeLaser/maddi の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QuiltMC/update-quilt-meta#28 ·
-
area/kotlin
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Large page[number] overflows the computed offset and returns the wrong page対応中かも @auraseb が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信