redhat-developer / redhat-developer/vscode-java
Not unboxing generic methods from dependencies
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
I believe the Intellisense is not properly unboxing generic methods when the is defined in a dependency (.class file).
Environment
- Operating System: MacOS
- JDK version: Oracle version 19
- Visual Studio Code version: 1.73.0
- Java extension version: v0.25.2022110400
More Information
I am not a very experienced Java developer and I've inherited a fairly large project so please forgive me if I'm not totally wrong or not making sense here.
In my case, using the inTransaction() function defined here
if(inTransaction(new DbTransactionUser<Boolean, Object>() {
public Boolean useTransaction() {
return true;
}
}) {
}
the above code cannot unbox the generic inTransaction and interpret it as a Boolean although if I define a similar generic function within my project, it seems to unbox correctly. This leads me to assume that it can unbox when reading from .java but cannot unbox when reading from .class files.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
DbQueryManager.java にリンクされている依存関係の実装を使用して、inTransaction() のジェネリックな例を再現し、その後、プロジェクト内で定義された同等のジェネリックメソッドと比較します。まず、.class ファイルから読み込まれたジェネリックメソッドに対する Java IntelliSense の処理を追跡します。依存関係で定義されたメソッドが、ソースで定義されたバージョンと同様に unboxed され、Boolean として解釈されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100