kennknowles commented on a change in pull request #13719:
URL: https://github.com/apache/beam/pull/13719#discussion_r555313479
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Trigger.java
##########
@@ -87,7 +88,7 @@ protected Trigger() {
}
public List<Trigger> subTriggers() {
- return subTriggers;
+ return MoreObjects.firstNonNull(subTriggers, Collections.emptyList());
Review comment:
I think also we could enable nullness checking on the subclasses and
discover that the field should never be null. Anyhow this fix makes the API
null-safe so looks good even though I think it can go further.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]