This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git
The following commit(s) were added to refs/heads/master by this push:
new aa58d55 avoid NPE on lines without artifactId
aa58d55 is described below
commit aa58d5525dbc3524e531b0c43f8049edd283f08f
Author: Hervé Boutemy <[email protected]>
AuthorDate: Fri Oct 30 23:19:17 2026 +0100
avoid NPE on lines without artifactId
---
.../java/org/apache/maven/dist/tools/ConfigurationLineInfo.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/maven/dist/tools/ConfigurationLineInfo.java
b/src/main/java/org/apache/maven/dist/tools/ConfigurationLineInfo.java
index 4817402..33a8cca 100644
--- a/src/main/java/org/apache/maven/dist/tools/ConfigurationLineInfo.java
+++ b/src/main/java/org/apache/maven/dist/tools/ConfigurationLineInfo.java
@@ -228,12 +228,12 @@ public class ConfigurationLineInfo {
}
public static String toGitRepositoryId(String artifactId) {
+ if ((artifactId == null) || artifactId.startsWith("maven-")) {
+ return artifactId;
+ }
if ("apache-maven".equals(artifactId)) {
return "maven";
}
- if (artifactId.startsWith("maven-")) {
- return artifactId;
- }
return "maven-" + artifactId;
}
}