public ImmutableList list()

in src/main/java/com/googlesource/gerrit/plugins/manager/repository/CorePluginsRepository.java [117:139]


  public ImmutableList<PluginInfo> list(String gerritVersion) throws IOException {
    if (!gerritVersion.equals(GERRIT_VERSION)) {
      logger.atWarning().log(
          "No core plugins available for version %s which is different than "
              + "the current running Gerrit",
          gerritVersion);
      return ImmutableList.of();
    }

    if (siteGerritWar == null) {
      logger.atWarning().log("Core plugins not available in non-war Gerrit distributions");
      return ImmutableList.of();
    }

    try (JarFile gerritWar = new JarFile(siteGerritWar.toFile())) {
      return gerritWar.stream()
          .filter(e -> e.getName().startsWith("WEB-INF/plugins") && e.getName().endsWith(".jar"))
          .map(this::extractPluginInfoFromJarEntry)
          .filter(Objects::nonNull)
          .sorted(comparing(p -> p.name))
          .collect(toImmutableList());
    }
  }