[ https://issues.apache.org/jira/browse/MNG-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642868#comment-17642868 ]
ASF GitHub Bot commented on MNG-7615: ------------------------------------- gnodet commented on code in PR #893: URL: https://github.com/apache/maven/pull/893#discussion_r1038806942 ########## maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java: ########## @@ -52,8 +53,8 @@ public DefaultSuperPomProvider(ModelProcessor modelProcessor) { @Override public Model getSuperModel(String version) { - if (superModel == null) { - String resource = "/org/apache/maven/model/pom-" + version + ".xml"; + return SUPER_MODELS.computeIfAbsent(version, v -> { Review Comment: It could, though the only place it's called is with `4.0.0` afaik, and that's since ages. I found the code does not reflect the javadoc and that the `version` parameter is not used, so I fixed it. If that's not intended, then we should remove the parameter completely. The version was originally hardcoded, see https://github.com/apache/maven/commit/dd635ca490bae271442d7b69eafdf595a627cafd The commit added a version parameter, but it's only used the first time and subsequent calls return the cached version. As for having multiple superpoms, I think the problem is that the version has never been updated when the pom changed. So not sure what the future will be for the supermom... > Multithreaded model builder > --------------------------- > > Key: MNG-7615 > URL: https://issues.apache.org/jira/browse/MNG-7615 > Project: Maven > Issue Type: Task > Reporter: Guillaume Nodet > Assignee: Guillaume Nodet > Priority: Major > > Parsing all reactor models can be very lengthy, so use a map/reduce algorithm > to make the computation in parallel. -- This message was sent by Atlassian Jira (v8.20.10#820010)