nikitagrover19 commented on code in PR #37345:
URL: https://github.com/apache/beam/pull/37345#discussion_r3004726901


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java:
##########
@@ -1727,7 +1727,10 @@ public void startBundle(StartBundleContext c) throws 
IOException {
         this.pubsubClient =
             getPubsubClientFactory()
                 .newClient(
-                    getTimestampAttribute(), null, 
c.getPipelineOptions().as(PubsubOptions.class));
+                    getTimestampAttribute(),
+                    null,
+                    c.getPipelineOptions().as(PubsubOptions.class),
+                    Write.this.getPubsubRootUrl());

Review Comment:
   Both PubsubJsonClient and PubsubGrpcClient use 
MoreObjects.firstNonNull(rootUrlOverride, options.getPubsubRootUrl()) — so if 
Write.this.getPubsubRootUrl() returns null, it falls back to 
options.getPubsubRootUrl() which has 
@Default.String("https://pubsub.googleapis.com";). So yes, the default is 
preserved correctly in the null case. No change needed here unless you'd prefer 
an explicit null guard for clarity?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to