Abacn commented on code in PR #34296: URL: https://github.com/apache/beam/pull/34296#discussion_r2036116092
########## sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/UnboundedSolaceReader.java: ########## @@ -185,7 +185,14 @@ public Instant getWatermark() { if (getSessionService().getReceiver().isEOF()) { return BoundedWindow.TIMESTAMP_MAX_VALUE; } - return watermarkPolicy.getWatermark(); + try { + return watermarkPolicy.getWatermark(); + } catch (NullPointerException e) { Review Comment: It is generally a bad practice to catch NullPointerException. Consider avoid it by if (watermarkPolicy.getWatermark() == null { BoundedWindow.TIMESTAMP_MIN_VALUE; // with explanation } return watermarkPolicy.getWatermark(); -- 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