private static String getResourcePath()

in src/main/java/org/apache/datasketches/memory/internal/Util.java [139:151]


  private static String getResourcePath(final String shortFileName) {
    Objects.requireNonNull(shortFileName, "input parameter " + shortFileName + " cannot be null.");
    try {
      final URL url = Util.class.getClassLoader().getResource(shortFileName);
      Objects.requireNonNull(url, "resource " + shortFileName + " could not be acquired.");
      final URI uri = url.toURI();
      //decodes any special characters
      final String path = uri.isAbsolute() ? Paths.get(uri).toAbsolutePath().toString() : uri.getPath();
      return path;
    } catch (final URISyntaxException e) {
      throw new IllegalArgumentException("Cannot find resource: " + shortFileName + LS + e);
    }
  }