@Override
  public @NotNull FileType getFileTypeByFileName(@NotNull CharSequence fileName) {
    FileTypeBean pendingFileType = withReadLock(() -> pendingAssociations.findAssociatedFileType(fileName));
    if (pendingFileType != null) {
      return getFileTypeOrUnknown(instantiateFileTypeBean(pendingFileType));
    }
    FileTypeWithDescriptor ftd = withReadLock(() -> patternsTable.findAssociatedFileType(fileName));
    return getFileTypeOrUnknown(ftd);
  }
@Override
  public @NotNull FileType getFileTypeByFileName(@NotNull CharSequence fileName)