private static @Nullable String prepareWatchRoot(@NotNull String root) {
    int index = root.indexOf(JarFileSystem.JAR_SEPARATOR);
    if (index >= 0) root = root.substring(0, index);
    try {
      Path rootPath = Path.of(FileUtil.toSystemDependentName(root));
      if (!rootPath.isAbsolute()) throw new InvalidPathException(root, "Watch roots should be absolute");
      return FileUtil.toSystemIndependentName(rootPath.toString());
    }
    catch (InvalidPathException e) {
      LOG.warn("invalid watch root", e);
      return null;
    }
  }
private static @Nullable String prepareWatchRoot(@NotNull String root)