OverlayManager.compareOverlayWithArtifact() treats null classifier as literal "null" string

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

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

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

2026年7月4日 から。

  • #624 @elharo による — マージされずにクローズ
  • #627 @elharo による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
java
領域
build-system

調査の方向性

src/main/java/org/apache/maven/plugins/war/overlay/OverlayManager.java の 205~206 行を開き、隣接する MWAR-241 のコメントを読んでください。classifier の比較を確認し、null と空の classifier が等しいものとして扱われることを検証してください。overlay と artifact のマッチングでこの 2 つのケースを区別しなくなれば、issue は完了です。

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

説明

bug

Bug Description

OverlayManager.compareOverlayWithArtifact() at src/main/java/org/apache/maven/plugins/war/overlay/OverlayManager.java lines 205-206 uses Objects.toString(overlay.getClassifier()) which converts a null classifier to the literal string "null" rather than "".

The adjacent comment explicitly states that null and "" should be treated as equal for classifier comparison (MWAR-241), but this code treats them as distinct.

Impact

Overlay-to-artifact matching fails when one side has a null classifier and the other has an empty string.

Code

// Line 205-206
Objects.toString(overlay.getClassifier())
// When overlay.getClassifier() is null, this returns "null" not ""

Expected behavior

Use Objects.toString(overlay.getClassifier(), "") so that null is treated as empty string, matching the documented intent.

主要言語
Java
スター
48
フォーク
103
平均マージ
11時間 20分
マージ済み PR(30日)
15

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

apache/maven-war-plugin のほかの issue

apache/maven-war-plugin の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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