diff --git a/src/main/java/io/weaviate/client6/v1/api/Config.java b/src/main/java/io/weaviate/client6/v1/api/Config.java index 50abb2f02..f1da7a136 100644 --- a/src/main/java/io/weaviate/client6/v1/api/Config.java +++ b/src/main/java/io/weaviate/client6/v1/api/Config.java @@ -23,7 +23,7 @@ public static Config of(Function> fn) { return fn.apply(new Custom()).build(); } - public Config(Builder builder) { + private Config(Builder builder) { this( builder.scheme, builder.httpHost, @@ -42,7 +42,7 @@ public GrpcChannelOptions grpcTransportOptions() { return new GrpcChannelOptions(scheme, grpcHost, grpcPort, headers, tokenProvider); } - abstract static class Builder> implements ObjectBuilder { + private abstract static class Builder> implements ObjectBuilder { protected String scheme; protected String httpHost; @@ -158,8 +158,8 @@ public static class Custom extends Builder { * 443 for HTTPS connection and 80 for HTTP. */ public Custom scheme(String scheme) { - httpPort(scheme == "https" ? 443 : 80); - grpcPort(scheme == "https" ? 443 : 80); + httpPort("https".equals(scheme) ? 443 : 80); + grpcPort("https".equals(scheme) ? 443 : 80); return super.scheme(scheme); } @@ -169,7 +169,7 @@ public Custom httpHost(String httpHost) { } public Custom httpPort(int port) { - this.grpcPort = port; + this.httpPort = port; return this; }