protected URL createRelativeURL(String relativePath) throws MalformedURLException {
        if (relativePath.startsWith("/")) {
            relativePath = relativePath.substring(1);
        }
        // # can appear in filenames, java.net.URL should not treat it as a fragment
        relativePath = StringUtils.replace(relativePath, "#", "%23");
        // Use the URL constructor for applying the relative path as a URL spec
        return new URL(this.url, relativePath);
    }
This delegate creates a {@code java.net.URL}, applying the given path
relative to the path of the underlying URL of this resource descriptor.
A leading slash will get dropped; a "#" symbol will get encoded.

see #createRelative(String)
see java.net.URL#URL(java.net.URL, String)
@since 5.2
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/io/UrlResource.java