mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Guard against incorrectly registered extensions (IDEA-CR-48285)
GitOrigin-RevId: 6578f81b58a245d9bd4f63a7778b1a8c8cdb90c1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1922ebc5ed
commit
eb87190ea4
@@ -53,7 +53,10 @@ public class FileTypeExtension<T> extends KeyedExtensionCollector<T, FileType> {
|
||||
List<KeyedLazyInstance<T>> extensions = getExtensions();
|
||||
Map<FileType, T> result = new HashMap<>();
|
||||
for (KeyedLazyInstance<T> extension : extensions) {
|
||||
result.put(FileTypeRegistry.getInstance().findFileTypeByName(extension.getKey()), extension.getInstance());
|
||||
FileType fileType = FileTypeRegistry.getInstance().findFileTypeByName(extension.getKey());
|
||||
if (fileType != null) {
|
||||
result.put(fileType, extension.getInstance());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user