NPE in ToolchainsRequirement.getParams() when type is not found
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- java
- 領域
- build-system
調査の方向性
src/main/java/org/apache/maven/plugins/toolchain/ToolchainsRequirement.java の getParams() から始め、特に 42-44 行目を確認し、issue に記載された呼び出し元のコンテキストを調べてください。要求された型が toolchains map に存在しない場合の動作を検証し、そのケースのカバレッジを追加してください。未知の型によって予期しない NullPointerException が発生しなくなり、選択した空の map または null の動作がカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
throws when called with a type that is not present in the toolchains map, instead of returning an empty map or null gracefully.
Location
Code
Problem
If is not a key in the map, returns , and throws .
Currently this is only called from with types from , which in turn originates from the entry set keys, so the current callers are safe. However, this is a fragile public API that will break if called with an unknown type.
Impact
Any future or external caller passing a non-existent type will get an unexpected NPE instead of a gracefully handled missing key.
Suggested Fix
- 主要言語
- Java
- スター
- 26
- フォーク
- 32
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/maven-toolchains-plugin のほかの issue
-
NPE during display-discovered-jdk-toolchains goal in ToolchainDiscoverer.discoverToolchains()対応中かも @efegokdemir が 16 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/maven-toolchains-plugin#191 ·
メンテナーはふだん 2 日以内に返信
-
New select-jdk-toolchain goal should warn about empty config対応中かも @efegokdemir が 15 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
apache/maven-toolchains-plugin#183 ·
メンテナーはふだん 2 日以内に返信
-
Unnecessary static synchronization in ToolchainMojo causes contention in multi-module builds対応中かも @elharo が 78 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/maven-toolchains-plugin#174 ·
メンテナーはふだん 2 日以内に返信
-
Dead code: unreachable null check on @Parameter(required=true) in ToolchainMojo対応中かも @efegokdemir が 15 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
apache/maven-toolchains-plugin#175 ·
メンテナーはふだん 2 日以内に返信
-
Infinite recursion risk in ToolchainDiscoverer.getCanonicalPath() for root paths対応中かも @efegokdemir が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/maven-toolchains-plugin#171 ·
メンテナーはふだん 2 日以内に返信
apache/maven-toolchains-plugin の issue をすべて見る
似ている issue
-
Fix Math.ceilDiv wrong result for exact positive divisions対応中かも @pamod-madubashana が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
scala-native/scala-native#5094 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] AI unread message badge counts a batch of new bubbles as one message対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/rocketmq-dashboard#5784 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
PCL-Community/PCL-CE#3658 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
apache/skywalking#14127 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信