code: private static String normalizePath(String path) {
          if (path == null || path.isEmpty() || "/".equals(path)) {
              return "/*";
          }
          if (isValidFilePath(path)) {
              return path;
          }
          if (isValidDirPath(path)) {
              if (path.endsWith("/")) {
                  return path + '*';
              } else {
                  return path + "/*";
              }
          }
          return path;
      }
docs: Normalizes the path according to the following order.
  <ul>
  <li>if the path is {@code null}, empty string or "/", normalize to {@code "/*"}</li>
  <li>if the path is a valid file path, return the path as it is</li>
  <li>if the path is a valid directory path, append "*" at the end</li>
  </ul>