@Nullable
  public static IndexPropertyHolder readIndexProperty(File dir) throws MavenIndexException {
    Properties props = new Properties();
    try (FileInputStream s = new FileInputStream(new File(dir, INDEX_INFO_FILE))) {
      props.load(s);
    }
    catch (FileNotFoundException e) {
      return null;
    }
    catch (IOException e) {
      throw new MavenIndexException("Cannot read " + INDEX_INFO_FILE + " file", e);
    }

    if (!CURRENT_VERSION.equals(props.getProperty(INDEX_VERSION_KEY))) {
      throw new MavenIndexException("Incompatible index version, needs to be updated: " + dir);
    }

    RepositoryKind kind = RepositoryKind.valueOf(props.getProperty(KIND_KEY));

    Set<String> repositoryIds = Collections.emptySet();
    String myRepositoryIdsStr = props.getProperty(ID_KEY);
    if (myRepositoryIdsStr != null) {
      repositoryIds = Set.copyOf(split(myRepositoryIdsStr, ","));
    }
    String repositoryPathOrUrl = normalizePathOrUrl(props.getProperty(PATH_OR_URL_KEY));
    if (kind != RepositoryKind.LOCAL) {
      repositoryPathOrUrl = repositoryPathOrUrl.toLowerCase(Locale.ROOT);
    }
    long updateTimestamp = -1L;
    try {
      String timestamp = props.getProperty(TIMESTAMP_KEY);
      if (timestamp != null) updateTimestamp = Long.parseLong(timestamp);
    }
    catch (Exception ignored) {
    }

    String dataDirName = props.getProperty(DATA_DIR_NAME_KEY);
    String failureMessage = props.getProperty(FAILURE_MESSAGE_KEY);
    return new IndexPropertyHolder(dir, kind, repositoryIds, repositoryPathOrUrl, updateTimestamp, dataDirName, failureMessage);
  }
@Nullable
  public static IndexPropertyHolder readIndexProperty(File dir)