enforce use of builder to create a new HTTPVaultConnector (#54)
All checks were successful
continuous-integration/drone/push Build is passing

Remove constructors of HTTPVaultConnector and make the builder
constructor package-private to enforce use of .builder()....build()

For convenience we add direct builder constructors with a full URI
argument to allow a one-line initialization if necessary.
This commit is contained in:
2021-06-12 12:01:52 +02:00
committed by GitHub
parent 71564e87e8
commit 3c11fe912b
8 changed files with 109 additions and 259 deletions

View File

@@ -57,7 +57,7 @@ public final class RequestHelper implements Serializable {
final Integer timeout,
final String tlsVersion,
final X509Certificate trustedCaCert) {
this.baseURL = baseURL;
this.baseURL = baseURL + (baseURL.endsWith("/") ? "" : "/");
this.retries = retries;
this.timeout = timeout;
this.tlsVersion = tlsVersion;