redhat-developer / redhat-developer/vscode-java
Recognize contractual non-nullness of standard library functions
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
The nullness analyzer does not recognize that certain standard library functions will, contractually, never return null. A common example would be Integer::toString.
These methods will generate unchecked cast warnings if assigned to a @Nonnull field.
As I understand, the plugin relies on Eclipse JDT for nullness analysis. I have come across LastNPE, which publishes JDT-compatible external null annotation files for many common libraries.
Would it be possible to include these annotations by default? Alternatively, if this is not desirable, could EAA files be supported by the plugin?
Environment
- Operating System: Windows 10 Enterprise
- JDK version: openjdk 11.0.12 2021-07-20
- Visual Studio Code version: 1.71.2
- Java extension version: v1.11.0
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue ではソースファイルもテストも指定されていません。まず、拡張機能が nullness 解析を Eclipse JDT にどのように委譲しているかを調べ、LastNPE の JDT 互換アノテーションと要求されている EAA サポートを比較してください。標準ライブラリの Integer::toString のようなメソッドを @Nonnull フィールドに代入したときに、unchecked cast 警告が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100