You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2024/10/16 14:14:13 UTC

(maven) branch master updated: [MNG-8296] Support creating unknown Language on the fly (#1809)

This is an automated email from the ASF dual-hosted git repository.

cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new ee29050d0f [MNG-8296] Support creating unknown Language on the fly (#1809)
ee29050d0f is described below

commit ee29050d0fc3ee5e5373df9a6cb36cb4bf80ff20
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Oct 16 16:14:07 2024 +0200

    [MNG-8296] Support creating unknown Language on the fly (#1809)
    
    ---
    
    https://issues.apache.org/jira/browse/MNG-8296
---
 .../main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java
index fa5aa9d461..37e478ada3 100644
--- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java
+++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java
@@ -91,7 +91,7 @@ public class DefaultTypeRegistry extends AbstractEventSpy implements TypeRegistr
                 ArtifactHandler handler = manager.getArtifactHandler(id);
                 type = new DefaultType(
                         id,
-                        languageRegistry.require(handler.getLanguage()),
+                        languageRegistry.lookup(handler.getLanguage()).orElseGet(() -> handler::getLanguage),
                         handler.getExtension(),
                         handler.getClassifier(),
                         handler.isIncludesDependencies(),