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/29 13:50:03 UTC
[I] [maven-4.0.x] DefaultInheritanceAssembler: NPE from null artifactId [maven]
elharo opened a new issue, #12603:
URL: https://github.com/apache/maven/issues/12603
# DefaultInheritanceAssembler: NPE from null artifactId
**Found in:** maven-4.0.x branch
**File:** `impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultInheritanceAssembler.java` (lines 99-109)
**Severity:** Medium
## Description
`child.getArtifactId()` can return null for POMs that inherit their artifactId. At line 128, `childName.equals(childDirectory)` would then NPE:
```java
String childName = child.getArtifactId(); // can be null
...
if (child.getProjectDirectory() != null) {
childName = child.getProjectDirectory().getFileName().toString(); // getFileName() can return null
}
```
Additionally, `child.getProjectDirectory().getFileName()` returns null for root paths (e.g., `/`), causing NPE at `.toString()`.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [maven-4.0.x] DefaultInheritanceAssembler: NPE from null artifactId [maven]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo closed issue #12603: [maven-4.0.x] DefaultInheritanceAssembler: NPE from null artifactId
URL: https://github.com/apache/maven/issues/12603
--
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