docs: public static String[] smartPathSplit(final String pathStr, final char separatorChar) {
          if (pathStr == null || pathStr.isEmpty()) {
              return new String[0];
          }
          if (separatorChar != ':') {
              // The fast path for Windows (which uses ';' as a path separator), or for separator other than ':'
              final List<String> partsFiltered = new ArrayList<>();
              for (final String part : pathStr.split(String.valueOf(separatorChar))) {
                  final String partFiltered = part.trim();
                  if (!partFiltered.isEmpty()) {
                      partsFiltered.add(partFiltered);
                  }
              }
              return partsFiltered.toArray(new String[0]);
          } else {
              // If the separator char is ':', don't split on URL protocol boundaries.
              // This will allow for HTTP(S) jars to be given in java.class.path.
              // (The JRE may not even support them, but we may as well do so.)
              final Set<Integer> splitPoints = new HashSet<>();
              for (int i = -1;;) {
                  boolean foundNonPathSeparator = false;
                  for (int j = 0; j < UNIX_NON_PATH_SEPARATORS.length; j++) {
                      // Skip ':' characters in the middle of non-path-separators such as "http://"
                      final int startIdx = i - UNIX_NON_PATH_SEPARATOR_COLON_POSITIONS[j];
                      if (pathStr.regionMatches(true, startIdx, UNIX_NON_PATH_SEPARATORS[j], 0,
                              UNIX_NON_PATH_SEPARATORS[j].length())
                              && (startIdx == 0 || pathStr.charAt(startIdx - 1) == ':')) {
                          // Don't treat the "jar:" in the middle of "x.jar:y.jar" as a URL scheme
                          foundNonPathSeparator = true;
                          break;
                      }
                  }
                  if (!foundNonPathSeparator) {
                      // The ':' character is a valid path separator
                      splitPoints.add(i);
                  }
                  // Search for next ':' character
                  i = pathStr.indexOf(':', i + 1);
                  if (i < 0) {
                      // Add end of string marker once last ':' has been found
                      splitPoints.add(pathStr.length());
                      break;
                  }
              }
              final List<Integer> splitPointsSorted = new ArrayList<>(splitPoints);
              CollectionUtils.sortIfNotEmpty(splitPointsSorted);
              final List<String> parts = new ArrayList<>();
              for (int i = 1; i < splitPointsSorted.size(); i++) {
                  final int idx0 = splitPointsSorted.get(i - 1);
                  final int idx1 = splitPointsSorted.get(i);
                  // Trim, and unescape "\\:"
                  String part = pathStr.substring(idx0 + 1, idx1).trim();
                  part = part.replaceAll("\\\\:", ":");
                  // Remove empty path components
                  if (!part.isEmpty()) {
                      parts.add(part);
                  }
              }
              return parts.toArray(new String[0]);
          }
      }