Suvrat1629 commented on code in PR #35919:
URL: https://github.com/apache/beam/pull/35919#discussion_r2288890291


##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/UnboundedSolaceReader.java:
##########
@@ -181,11 +181,18 @@ public void finalizeReadyMessages() {
 
   @Override
   public Instant getWatermark() {
-    // should be only used by a test receiver
     if (getSessionService().getReceiver().isEOF()) {
       return BoundedWindow.TIMESTAMP_MAX_VALUE;
     }
-    return watermarkPolicy.getWatermark();
+    Instant watermark = watermarkPolicy.getWatermark();
+    if (watermark == null) {

Review Comment:
   Oh well my pr was a follow up fix for my older pr that got closed due to 
inactivity(#34296), this is the fix I thought @Abacn had asked for and since I 
had gotten back to contributing I thought about putting some work into this :)
   
   Also as you said that:
   > null checking is enabled for that class so the type should be accurate.
   
   since I am trying to learn about the codebase could you tell me how this 
works.
   
   Thank you.



-- 
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: github-unsubscr...@beam.apache.org

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

Reply via email to