NonNull by default in runners/core/triggers

Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/9ab7cd4c
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/9ab7cd4c
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/9ab7cd4c

Branch: refs/heads/master
Commit: 9ab7cd4cb802f5fdf98e1dde459df86ded482e9b
Parents: 4ff0464
Author: Kenneth Knowles <k...@google.com>
Authored: Sun Oct 29 20:58:58 2017 -0700
Committer: Kenneth Knowles <k...@apache.org>
Committed: Thu Nov 9 15:01:55 2017 -0800

----------------------------------------------------------------------
 runners/core-java/pom.xml                                       | 5 +++++
 .../core/triggers/TriggerStateMachineContextFactory.java        | 2 +-
 .../org/apache/beam/runners/core/triggers/package-info.java     | 4 ++++
 3 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/9ab7cd4c/runners/core-java/pom.xml
----------------------------------------------------------------------
diff --git a/runners/core-java/pom.xml b/runners/core-java/pom.xml
index 087e24d..4811134 100644
--- a/runners/core-java/pom.xml
+++ b/runners/core-java/pom.xml
@@ -80,6 +80,11 @@
     <!-- build dependencies -->
 
     <dependency>
+      <groupId>com.github.stephenc.findbugs</groupId>
+      <artifactId>findbugs-annotations</artifactId>
+    </dependency>
+
+    <dependency>
       <groupId>com.google.auto.value</groupId>
       <artifactId>auto-value</artifactId>
       <scope>provided</scope>

http://git-wip-us.apache.org/repos/asf/beam/blob/9ab7cd4c/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/TriggerStateMachineContextFactory.java
----------------------------------------------------------------------
diff --git 
a/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/TriggerStateMachineContextFactory.java
 
b/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/TriggerStateMachineContextFactory.java
index 811f30c..e571f25 100644
--- 
a/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/TriggerStateMachineContextFactory.java
+++ 
b/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/TriggerStateMachineContextFactory.java
@@ -143,7 +143,7 @@ public class TriggerStateMachineContextFactory<W extends 
BoundedWindow> {
     }
 
     @Override
-    public ExecutableTriggerStateMachine firstUnfinishedSubTrigger() {
+    public @Nullable ExecutableTriggerStateMachine firstUnfinishedSubTrigger() 
{
       for (ExecutableTriggerStateMachine subTrigger : trigger.subTriggers()) {
         if (!finishedSet.isFinished(subTrigger)) {
           return subTrigger;

http://git-wip-us.apache.org/repos/asf/beam/blob/9ab7cd4c/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/package-info.java
----------------------------------------------------------------------
diff --git 
a/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/package-info.java
 
b/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/package-info.java
index b7c7050..5745092 100644
--- 
a/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/package-info.java
+++ 
b/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/package-info.java
@@ -20,4 +20,8 @@
  * State machine implementations for triggers, called "triggers" because
  * they react to events.
  */
+@DefaultAnnotation(NonNull.class)
 package org.apache.beam.runners.core.triggers;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;

Reply via email to