TeeInputStream.close skips source cleanup when closing the destination fails
まだ誰も着手していません。
評価
調査の方向性
org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeInputStream.javaを読み、特にリンク先の行付近にあるclose()を確認し、近くにあるストリームのテストを調べて、既存のクローズ処理と例外処理のパターンを確認してください。宛先のクローズで例外が発生するという報告されたケースを再現し、ドレイン時の失敗も確認してください。失敗後も両方のデリゲートに対する処理が試みられ、最初の例外が後続の例外を抑制した状態で呼び出し元に伝わり、テストでそれらのケースを網羅できたら完了です。
索引モデルが issue の本文から書いたものです。
説明
Version
JGit 7.8.1.202611041320-r, OpenJDK 21, macOS.
Bug description
When a caller closes a TeeInputStream, it drains the remaining input, closes the destination, and then closes the source. An exception from the destination's close() skips the source's close(). An exception during the drain skips both close calls. TeeInputStream.close() in 7.8.1
Actual behavior
I checked the public wrapper directly using an empty in-memory input and an in-memory output. With both delegates closing normally, each received one close call. When the output's close method threw an IOException, the wrapper propagated that exception and the input received zero close calls.
Expected behavior
After attempting the drain, the wrapper should attempt to close both delegates even if an earlier operation failed. The first failure should reach the caller, with any later close failures available as suppressed exceptions.
AI assistance was used to prepare this report.
- 主要言語
- Java
- スター
- 427
- フォーク
- 116
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-jgit/jgit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()再び着手できるかも @hardikyadav12 が 77 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
eclipse-jgit/jgit#297 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
eclipse-jgit/jgit#293 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eclipse-jgit/jgit#288 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eclipse-jgit/jgit#273 · コメント 1 件 ·
eclipse-jgit/jgit の issue をすべて見る
似ている issue
-
? - Needs Triage bot_watch bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/cudf-spark-jni#5594 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DataONEorg/dataone-indexer#390 ·