danielcweeks commented on code in PR #11992:
URL: https://github.com/apache/iceberg/pull/11992#discussion_r1931252722


##########
core/src/main/java/org/apache/iceberg/rest/HTTPClient.java:
##########
@@ -88,33 +84,30 @@ public class HTTPClient implements RESTClient {
 
   @VisibleForTesting static final String REST_SOCKET_TIMEOUT_MS = 
"rest.client.socket-timeout-ms";
 
-  private final String uri;
+  private final URI baseUri;
   private final CloseableHttpClient httpClient;
+  private final Map<String, String> baseHeaders;
   private final ObjectMapper mapper;
+  private final AuthSession authSession;
 
   private HTTPClient(
-      String uri,
+      URI baseUri,
       HttpHost proxy,
       CredentialsProvider proxyCredsProvider,
       Map<String, String> baseHeaders,
       ObjectMapper objectMapper,
       HttpRequestInterceptor requestInterceptor,
       Map<String, String> properties,
       HttpClientConnectionManager connectionManager) {
-    this.uri = uri;
+    this.baseUri = baseUri;
+    this.baseHeaders = baseHeaders;
     this.mapper = objectMapper;
+    this.authSession = AuthSession.EMPTY;

Review Comment:
   I understand that may seem like the case here, but I think we're just saying 
that you create it initially as set to `null`, but validate when `execute` is 
called that it is not null.  You can still create the HTTPClient, but you can't 
make a request unless there is an active auth session.  This just prevents 
unintentional use of an "empty" auth session (it needs to be intentional).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to