FileType (@NotNull CharSequence fileName) { FileTypeBean pendingFileType = withReadLock(() -> myPendingAssociations.findAssociatedFileType(fileName)); if (pendingFileType != null) { return getFileTypeOrUnknown(instantiateFileTypeBean(pendingFileType)); } FileTypeWithDescriptor ftd = withReadLock(() -> myPatternsTable.findAssociatedFileType(fileName)); return getFileTypeOrUnknown(ftd); }