com.quorum.tessera.partyinfo.URLNormalizer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tessera-partyinfo Show documentation
Show all versions of tessera-partyinfo Show documentation
Tessera is a stateless Java system that is used to enable the encryption, decryption, and distribution of private transactions for Quorum.
package com.quorum.tessera.partyinfo;
import java.net.URI;
import java.net.URISyntaxException;
public interface URLNormalizer {
default String normalize(String url) {
try {
final URI uri = new URI(url).normalize();
if (uri.getPath().isEmpty()) {
return url + "/";
}
} catch (URISyntaxException ex) {
throw new RuntimeException(String.format("Invalid URL %s", url));
}
return url;
}
static URLNormalizer create() {
return new URLNormalizer() {
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy