private URI getLocalURI()

in java/com/googlesource/gerrit/plugins/supermanifest/JiriUpdater.java [203:222]


  private URI getLocalURI(String projectName) {
    List<URI> uriList = Lists.newArrayList();
    downloadScheme.runEach(
        extension -> {
          DownloadScheme scheme = extension.get();
          if (scheme.isEnabled() && scheme.getUrl(projectName) != null) {
            String url = scheme.getUrl(projectName);
            URI localURI = URI.create(url);
            // Discard URIs whose scheme are not "http" or "https" as they may not contain full
            // hostname
            if (localURI.getScheme().equals("https") || localURI.getScheme().equals("http")) {
              uriList.add(localURI);
            }
          }
        });
    if (uriList.isEmpty()) {
      return null;
    }
    return uriList.get(0);
  }