You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/07/04 12:57:52 UTC

[PR] fix: prevent NPE in ManifestConfiguration.getClasspathPrefix() when prefix is null [maven-archiver]

elharo opened a new pull request, #381:
URL: https://github.com/apache/maven-archiver/pull/381

   Fixes #367.
   
   **Problem:** `ManifestConfiguration.getClasspathPrefix()` calls `.replaceAll()` on the field without a null check. The field is initialized to `""`, but the setter stores the value as-is. If any caller passes `null` (e.g., from unset XML configuration elements mapped via Plexus), the getter throws NPE.
   
   **Fix:** Guard `setClasspathPrefix()` against null, falling back to `""`.
   
   **Test:** Added `getClasspathPrefixShouldHandleNull()`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: prevent NPE in ManifestConfiguration.getClasspathPrefix() when prefix is null [maven-archiver]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo merged PR #381:
URL: https://github.com/apache/maven-archiver/pull/381


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org