@Override
  public @NotNull Url resolve(@NotNull String subPath) {
    String newPath = path.isEmpty() && authority == null ? subPath : StringUtil.trimEnd(path, '/') + "/" + subPath;
    return new UrlImpl(scheme, authority, newPath, parameters);
  }
@Override
  public @NotNull Url resolve(@NotNull String subPath)