@Override
    protected IRepository<IArtifactKey> loadRepository(
        URI location, IProgressMonitor monitor, String type, int flags) throws ProvisionException {
      IRepository<IArtifactKey> result = loader.loadRepository(location, monitor, type, flags);

      // Because of the poor implementation in
      // org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getMaximumThreads()
      // which as reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=471861 but is not yet
      // fixed,
      // we work the around the problem by setting the global PROP_MAX_THREADS into the repository
      // properties.
      if (GLOBAL_MAX_THREADS != null
          && !result.isModifiable()
          && result instanceof SimpleArtifactRepository) {
        Map<String, String> properties = ReflectUtil.getValue("properties", result);
        String respositoryMaxThreads = properties.get(SimpleArtifactRepository.PROP_MAX_THREADS);
        if (respositoryMaxThreads == null) {
          properties.put(SimpleArtifactRepository.PROP_MAX_THREADS, GLOBAL_MAX_THREADS);
        }
      }

      return result;
    }
 @Override
 protected IRepository<IInstallableUnit> loadRepository(
     URI location, IProgressMonitor monitor, String type, int flags) throws ProvisionException {
   return loader.loadRepository(location, monitor, type, flags);
 }