[MNG-8296] Support creating unknown Language on the fly (#1809)

---

https://issues.apache.org/jira/browse/MNG-8296
This commit is contained in:
Guillaume Nodet 2024-10-16 16:14:07 +02:00 committed by GitHub
parent a293822852
commit ee29050d0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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(),