void applyLoaderData(@NotNull IndexRegistrar registrar, @NotNull Loader loader) {
    if (registrar.classPackageCount() != 0) {
      StrippedLongToObjectMap<Loader[]> newClassMap = classPackageCache == null
                                                      ? new StrippedLongToObjectMap<>(ARRAY_FACTORY, registrar.classPackageCount())
                                                      : new StrippedLongToObjectMap<>(classPackageCache);
      addPackages(registrar.classPackages(), newClassMap, loader, registrar.getKeyFilter(true));
      classPackageCache = newClassMap;
      classPackageCacheGetter = newClassMap;
    }
    if (registrar.resourcePackageCount() != 0) {
      StrippedLongToObjectMap<Loader[]> newResourceMap = resourcePackageCache == null
                                                         ? new StrippedLongToObjectMap<>(ARRAY_FACTORY, registrar.resourcePackageCount())
                                                         : new StrippedLongToObjectMap<>(resourcePackageCache);
      addPackages(registrar.resourcePackages(), newResourceMap, loader, registrar.getKeyFilter(false));
      resourcePackageCache = newResourceMap;
      resourcePackageCacheGetter = newResourceMap;
    }
  }
void applyLoaderData(@NotNull IndexRegistrar registrar, @NotNull Loader loader)