Cleanup: restore the interrupt flag in the API client and health checker

オープン 初心者向け
#257 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Rishankgupta08 がすでに取り組んでいます。

2026年11月14日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
testing-qa

調査の方向性

指定された3か所から始めてください。ApiAuth.java の117行目付近、ApiClient.java の142行目付近、ApiHealthChecker.java の70行目付近で、いずれも src/main/java/com/seleniumboot 以下にあります。それぞれで InterruptedException を握りつぶしている catch ブロックを見つけ、既存の処理は残したまま Thread.currentThread().interrupt() を追加してください。この3か所で割り込みフラグが復元され、それ以外の動作が変わらず、mvn test が通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

good first issue

Part of the cleanup cycle from #251. SonarCloud rule java:S2142 flags these spots.

These places catch InterruptedException (often inside catch (Exception e)) and carry on without restoring the thread's interrupt flag. Anything further up that checks Thread.interrupted() (a parallel runner shutting down, a timeout) never sees the interrupt.

Where (line numbers as of master 2a07bba):

  • src/main/java/com/seleniumboot/client/ApiAuth.java: line 117
  • src/main/java/com/seleniumboot/client/ApiClient.java: line 142
  • src/main/java/com/seleniumboot/precondition/ApiHealthChecker.java: line 70

Fix: restore the flag and keep the existing behaviour. For a combined catch, split it out:

} catch (InterruptedException e) {
    Thread.currentThread().interrupt();
    // then the same handling the old catch did (log / wrap / return)
} catch (Exception e) {
    ...
}

Done when: the listed spots restore the interrupt flag, the behaviour is otherwise unchanged, and mvn test passes. Keep this PR to this package. SonarCloud reruns on the PR.

主要言語
Java
スター
12
フォーク
6
平均マージ
10時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

seleniumboot/selenium-boot のほかの issue

seleniumboot/selenium-boot の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。