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... -- 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-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org