diff options
author | Kristen Kozak <sebright@google.com> | 2017-12-18 22:21:10 -0800 |
---|---|---|
committer | Kristen Kozak <sebright@google.com> | 2017-12-19 10:28:06 -0800 |
commit | dc0ed0bba9d2adc1f3bee8558746560fbdb0f8a8 (patch) | |
tree | f67fe3d057e4fd40fc3b9d1e1c06e5e5428d3f89 /impl | |
parent | b211232aa11cb3a35a33ad7d0fbd4ce7d07f0522 (diff) | |
download | opencensus-java-dc0ed0bba9d2adc1f3bee8558746560fbdb0f8a8.tar.gz |
Add more null annotations (issue #359).
This commit adds some Nullable annotations that are required by the Checker
Framework, but it doesn't change any other code. It also suppresses some Error
Prone and FindBugs warnings that conflict with the Checker Framework, since the
three tools use different algorithms.
Diffstat (limited to 'impl')
-rw-r--r-- | impl/src/main/java/io/opencensus/impl/internal/DisruptorEventQueue.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/impl/src/main/java/io/opencensus/impl/internal/DisruptorEventQueue.java b/impl/src/main/java/io/opencensus/impl/internal/DisruptorEventQueue.java index a9e25d13..8b15c37b 100644 --- a/impl/src/main/java/io/opencensus/impl/internal/DisruptorEventQueue.java +++ b/impl/src/main/java/io/opencensus/impl/internal/DisruptorEventQueue.java @@ -25,6 +25,7 @@ import com.lmax.disruptor.dsl.ProducerType; import io.opencensus.implcore.internal.DaemonThreadFactory; import io.opencensus.implcore.internal.EventQueue; import java.util.concurrent.Executors; +import javax.annotation.Nullable; import javax.annotation.concurrent.ThreadSafe; /** @@ -144,7 +145,7 @@ public final class DisruptorEventQueue implements EventQueue { // An event in the {@link EventQueue}. Just holds a reference to an EventQueue.Entry. private static final class DisruptorEvent { - private Entry entry = null; + @Nullable private Entry entry; // Sets the EventQueueEntry associated with this DisruptorEvent. void setEntry(Entry entry) { @@ -152,6 +153,7 @@ public final class DisruptorEventQueue implements EventQueue { } // Returns the EventQueueEntry associated with this DisruptorEvent. + @Nullable Entry getEntry() { return entry; } |