@ApiStatus.Internal
  public static void updatePluginHostsFromConfigDir(@NotNull Path oldConfigDir, @NotNull Logger logger) {
    logger.info("reading plugin repositories from " + oldConfigDir);
    try {
      var text = ComponentStorageUtil.loadTextContent(oldConfigDir.resolve("options/updates.xml"));
      var components = ComponentStorageUtil.loadComponents(JDOMUtil.load(text), null);
      var element = components.get("UpdatesConfigurable");
      if (element != null) {
        var hosts = XmlSerializer.deserialize(element, UpdateOptions.class).getPluginHosts();
        if (!hosts.isEmpty()) {
          amendPluginHostsProperty(hosts);
          logger.info("plugin hosts: " + System.getProperty("idea.plugin.hosts"));
        }
      }
    }
    catch (InvalidPathException | IOException | JDOMException e) {
      logger.error("... failed: " + e.getMessage());
    }
  }
@ApiStatus.Internal
  public static void updatePluginHostsFromConfigDir(@NotNull Path oldConfigDir, @NotNull Logger logger)