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.
Bug Description
OverlayManager.compareOverlayWithArtifact()atsrc/main/java/org/apache/maven/plugins/war/overlay/OverlayManager.javalines 205-206 usesObjects.toString(overlay.getClassifier())which converts anullclassifier to the literal string"null"rather than"".The adjacent comment explicitly states that
nulland""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
Expected behavior
Use
Objects.toString(overlay.getClassifier(), "")so that null is treated as empty string, matching the documented intent.