docs: public static String normalizePath(final String path, final boolean isFileOrJarURL) {
          final boolean hasPercent = path.indexOf('%') >= 0;
          if (!hasPercent && path.indexOf('\\') < 0 && !path.endsWith("/")) {
              return path;
          } else {
              final int len = path.length();
              final StringBuilder buf = new StringBuilder();
              // Only "file:" and "jar:" URLs are %-decoded (issue 255)
              if (hasPercent && isFileOrJarURL) {
                  // Perform '%'-decoding of path segment
                  int prevEndMatchIdx = 0;
                  final Matcher matcher = percentMatcher.matcher(path);
                  while (matcher.find()) {
                      final int startMatchIdx = matcher.start();
                      final int endMatchIdx = matcher.end();
                      translateSeparator(path, prevEndMatchIdx, startMatchIdx, /* stripFinalSeparator = */ false,
                              buf);
                      unescapePercentEncoding(path, startMatchIdx, endMatchIdx, buf);
                      prevEndMatchIdx = endMatchIdx;
                  }
                  translateSeparator(path, prevEndMatchIdx, len, /* stripFinalSeparator = */ true, buf);
              } else {
                  // Fast path -- no '%', or "http(s)://" or "jrt:" URL, or non-"file:" or non-"jar:" URL
                  translateSeparator(path, 0, len, /* stripFinalSeparator = */ true, buf);
                  return buf.toString();
              }
              return buf.toString();
          }
      }