From dc526519110337031977e13b82971bfa7fcd30fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Kalliom=C3=A4ki?= Date: Tue, 27 Mar 2018 17:07:27 +0200 Subject: [PATCH] Annotate rest of WebRTC with @Nullable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:8881 Change-Id: Ic199efa73a0b3b9437df1e8fe5a1814a70380993 Reviewed-on: https://webrtc-review.googlesource.com/64884 Reviewed-by: Paulina Hensman Reviewed-by: Henrik Andreassson Commit-Queue: Sami Kalliomäki Cr-Commit-Position: refs/heads/master@{#22639} --- .../androidnativeapi/MainActivity.java | 9 ++-- .../java/src/org/webrtc/UnityUtility.java | 3 +- .../voiceengine/WebRtcAudioEffects.java | 9 ++-- .../voiceengine/WebRtcAudioManager.java | 3 +- .../webrtc/voiceengine/WebRtcAudioRecord.java | 11 ++--- .../webrtc/voiceengine/WebRtcAudioTrack.java | 9 ++-- rtc_base/BUILD.gn | 13 ------ sdk/android/BUILD.gn | 7 ---- .../src/org/webrtc/Camera2CapturerTest.java | 3 +- .../CameraVideoCapturerTestFixtures.java | 7 ++-- .../DefaultVideoEncoderFactoryTest.java | 3 +- .../org/webrtc/HardwareVideoDecoderTest.java | 3 +- .../org/webrtc/HardwareVideoEncoderTest.java | 3 +- .../src/org/webrtc/NetworkMonitorTest.java | 10 +++-- .../src/org/webrtc/PeerConnectionTest.java | 11 ++--- .../org/webrtc/SurfaceTextureHelperTest.java | 3 +- webrtc.gni | 42 +++++++++++++++++++ 17 files changed, 93 insertions(+), 56 deletions(-) diff --git a/examples/androidnativeapi/java/org/webrtc/examples/androidnativeapi/MainActivity.java b/examples/androidnativeapi/java/org/webrtc/examples/androidnativeapi/MainActivity.java index cb68c55470..173b797bc7 100644 --- a/examples/androidnativeapi/java/org/webrtc/examples/androidnativeapi/MainActivity.java +++ b/examples/androidnativeapi/java/org/webrtc/examples/androidnativeapi/MainActivity.java @@ -13,16 +13,17 @@ package org.webrtc.examples.androidnativeapi; import android.app.Activity; import android.os.Bundle; import android.widget.Button; +import javax.annotation.Nullable; import org.webrtc.ContextUtils; import org.webrtc.EglBase; import org.webrtc.GlRectDrawer; import org.webrtc.SurfaceViewRenderer; public class MainActivity extends Activity { - private CallClient callClient; - private EglBase eglBase; - private SurfaceViewRenderer localRenderer; - private SurfaceViewRenderer remoteRenderer; + private @Nullable CallClient callClient; + private @Nullable EglBase eglBase; + private @Nullable SurfaceViewRenderer localRenderer; + private @Nullable SurfaceViewRenderer remoteRenderer; @Override protected void onCreate(Bundle savedInstance) { diff --git a/examples/unityplugin/java/src/org/webrtc/UnityUtility.java b/examples/unityplugin/java/src/org/webrtc/UnityUtility.java index d2ca8a5386..93c06936a7 100644 --- a/examples/unityplugin/java/src/org/webrtc/UnityUtility.java +++ b/examples/unityplugin/java/src/org/webrtc/UnityUtility.java @@ -12,6 +12,7 @@ package org.webrtc; import android.content.Context; import java.util.List; +import javax.annotation.Nullable; public class UnityUtility { private static final String VIDEO_CAPTURER_THREAD_NAME = "VideoCapturerThread"; @@ -26,7 +27,7 @@ public class UnityUtility { return Camera2Enumerator.isSupported(ContextUtils.getApplicationContext()); } - private static VideoCapturer createCameraCapturer(CameraEnumerator enumerator) { + private static @Nullable VideoCapturer createCameraCapturer(CameraEnumerator enumerator) { final String[] deviceNames = enumerator.getDeviceNames(); for (String deviceName : deviceNames) { diff --git a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java index 90a48d3bc2..24ba0a12b8 100644 --- a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java +++ b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java @@ -19,6 +19,7 @@ import android.media.audiofx.NoiseSuppressor; import android.os.Build; import java.util.List; import java.util.UUID; +import javax.annotation.Nullable; import org.webrtc.Logging; // This class wraps control of three different platform effects. Supported @@ -40,12 +41,12 @@ public class WebRtcAudioEffects { // Contains the available effect descriptors returned from the // AudioEffect.getEffects() call. This result is cached to avoid doing the // slow OS call multiple times. - private static Descriptor[] cachedEffects = null; + private static @Nullable Descriptor[] cachedEffects = null; // Contains the audio effect objects. Created in enable() and destroyed // in release(). - private AcousticEchoCanceler aec = null; - private NoiseSuppressor ns = null; + private @Nullable AcousticEchoCanceler aec = null; + private @Nullable NoiseSuppressor ns = null; // Affects the final state given to the setEnabled() method on each effect. // The default state is set to "disabled" but each effect can also be enabled @@ -291,7 +292,7 @@ public class WebRtcAudioEffects { // Returns the cached copy of the audio effects array, if available, or // queries the operating system for the list of effects. - private static Descriptor[] getAvailableEffects() { + private static @Nullable Descriptor[] getAvailableEffects() { if (cachedEffects != null) { return cachedEffects; } diff --git a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java index 37e528b23f..dea84ca226 100644 --- a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java +++ b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java @@ -20,6 +20,7 @@ import android.media.AudioTrack; import android.os.Build; import java.util.Timer; import java.util.TimerTask; +import javax.annotation.Nullable; import org.webrtc.ContextUtils; import org.webrtc.Logging; @@ -102,7 +103,7 @@ public class WebRtcAudioManager { private static final int TIMER_PERIOD_IN_SECONDS = 30; private final AudioManager audioManager; - private Timer timer; + private @Nullable Timer timer; public VolumeLogger(AudioManager audioManager) { this.audioManager = audioManager; diff --git a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java index 8a6cb7150a..362f14d27e 100644 --- a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java +++ b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java @@ -19,6 +19,7 @@ import java.lang.System; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; import org.webrtc.Logging; import org.webrtc.ThreadUtils; @@ -51,12 +52,12 @@ public class WebRtcAudioRecord { private final long nativeAudioRecord; - private WebRtcAudioEffects effects = null; + private @Nullable WebRtcAudioEffects effects = null; private ByteBuffer byteBuffer; - private AudioRecord audioRecord = null; - private AudioRecordThread audioThread = null; + private @Nullable AudioRecord audioRecord = null; + private @Nullable AudioRecordThread audioThread = null; private static volatile boolean microphoneMute = false; private byte[] emptyBytes; @@ -73,7 +74,7 @@ public class WebRtcAudioRecord { void onWebRtcAudioRecordError(String errorMessage); } - private static WebRtcAudioRecordErrorCallback errorCallback = null; + private static @Nullable WebRtcAudioRecordErrorCallback errorCallback = null; public static void setErrorCallback(WebRtcAudioRecordErrorCallback errorCallback) { Logging.d(TAG, "Set error callback"); @@ -123,7 +124,7 @@ public class WebRtcAudioRecord { void onWebRtcAudioRecordSamplesReady(AudioSamples samples); } - private static WebRtcAudioRecordSamplesReadyCallback audioSamplesReadyCallback = null; + private static @Nullable WebRtcAudioRecordSamplesReadyCallback audioSamplesReadyCallback = null; public static void setOnAudioSamplesReady(WebRtcAudioRecordSamplesReadyCallback callback) { audioSamplesReadyCallback = callback; diff --git a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java index 79b630a783..ee2c76c130 100644 --- a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java +++ b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java @@ -20,6 +20,7 @@ import android.media.AudioTrack; import android.os.Process; import java.lang.Thread; import java.nio.ByteBuffer; +import javax.annotation.Nullable; import org.webrtc.ContextUtils; import org.webrtc.Logging; import org.webrtc.ThreadUtils; @@ -79,8 +80,8 @@ public class WebRtcAudioTrack { private ByteBuffer byteBuffer; - private AudioTrack audioTrack = null; - private AudioTrackThread audioThread = null; + private @Nullable AudioTrack audioTrack = null; + private @Nullable AudioTrackThread audioThread = null; // Samples to be played are replaced by zeros if |speakerMute| is set to true. // Can be used to ensure that the speaker is fully muted. @@ -107,8 +108,8 @@ public class WebRtcAudioTrack { void onWebRtcAudioTrackError(String errorMessage); } - private static WebRtcAudioTrackErrorCallback errorCallbackOld = null; - private static ErrorCallback errorCallback = null; + private static @Nullable WebRtcAudioTrackErrorCallback errorCallbackOld = null; + private static @Nullable ErrorCallback errorCallback = null; @Deprecated public static void setErrorCallback(WebRtcAudioTrackErrorCallback errorCallback) { diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index b3fbd45f4d..3c1b9f0e44 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -1383,18 +1383,5 @@ if (is_android) { "java/src/org/webrtc/Size.java", "java/src/org/webrtc/ThreadUtils.java", ] - - # TODO(crbug.com/824679): Find out why this fails in Chromium - if (!build_with_chromium) { - javac_args = [ - "-Xep:ParameterNotNullable:ERROR", - "-Xep:FieldMissingNullable:ERROR", - "-Xep:ReturnMissingNullable:ERROR", - ] - } - - deps = [ - "//third_party/jsr-305:jsr_305_javalib", - ] } } diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn index d226d7d63a..90ecd398df 100644 --- a/sdk/android/BUILD.gn +++ b/sdk/android/BUILD.gn @@ -845,16 +845,9 @@ rtc_android_library("libjingle_peerconnection_java") { ] } - javac_args = [ - "-Xep:ParameterNotNullable:ERROR", - "-Xep:FieldMissingNullable:ERROR", - "-Xep:ReturnMissingNullable:ERROR", - ] - deps = [ "../../modules/audio_device:audio_device_java", "../../rtc_base:base_java", - "//third_party/jsr-305:jsr_305_javalib", ] } diff --git a/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java b/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java index 6b6b18d1ed..5e925437ec 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java @@ -27,6 +27,7 @@ import android.support.test.filters.MediumTest; import android.support.test.filters.SmallTest; import java.io.IOException; import java.util.concurrent.CountDownLatch; +import javax.annotation.Nullable; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.junit.After; import org.junit.Before; @@ -46,7 +47,7 @@ public class Camera2CapturerTest { final LooperThread looperThread; final CountDownLatch openDoneSignal; final Object cameraDeviceLock; - CameraDevice cameraDevice; // Guarded by cameraDeviceLock + @Nullable CameraDevice cameraDevice; // Guarded by cameraDeviceLock boolean openSucceeded; // Guarded by cameraDeviceLock private class LooperThread extends Thread { diff --git a/sdk/android/instrumentationtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java b/sdk/android/instrumentationtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java index aea3e514cd..518e2f672d 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; +import javax.annotation.Nullable; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.junit.runner.RunWith; import org.webrtc.CameraEnumerationAndroid.CaptureFormat; @@ -103,7 +104,7 @@ class CameraVideoCapturerTestFixtures { static private class FakeCapturerObserver implements CameraVideoCapturer.CapturerObserver { private int framesCaptured = 0; - private VideoFrame videoFrame; + private @Nullable VideoFrame videoFrame; final private Object frameLock = new Object(); final private Object capturerStartLock = new Object(); private Boolean capturerStartResult; @@ -290,7 +291,7 @@ class CameraVideoCapturerTestFixtures { return cameraEnumerator.createCapturer(name, eventsHandler); } - public String getNameOfFrontFacingDevice() { + public @Nullable String getNameOfFrontFacingDevice() { for (String deviceName : cameraEnumerator.getDeviceNames()) { if (cameraEnumerator.isFrontFacing(deviceName)) { return deviceName; @@ -300,7 +301,7 @@ class CameraVideoCapturerTestFixtures { return null; } - public String getNameOfBackFacingDevice() { + public @Nullable String getNameOfBackFacingDevice() { for (String deviceName : cameraEnumerator.getDeviceNames()) { if (cameraEnumerator.isBackFacing(deviceName)) { return deviceName; diff --git a/sdk/android/instrumentationtests/src/org/webrtc/DefaultVideoEncoderFactoryTest.java b/sdk/android/instrumentationtests/src/org/webrtc/DefaultVideoEncoderFactoryTest.java index d1a3b6629b..b805dd44a9 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/DefaultVideoEncoderFactoryTest.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/DefaultVideoEncoderFactoryTest.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; +import javax.annotation.Nullable; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.junit.Before; import org.junit.Test; @@ -51,7 +52,7 @@ public class DefaultVideoEncoderFactoryTest { } @Override - public VideoEncoder createEncoder(VideoCodecInfo info) { + public @Nullable VideoEncoder createEncoder(VideoCodecInfo info) { return null; } diff --git a/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoDecoderTest.java b/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoDecoderTest.java index 09a8275fc1..bcbfa4e07d 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoDecoderTest.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoDecoderTest.java @@ -21,6 +21,7 @@ import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; import org.chromium.base.test.params.BaseJUnit4RunnerDelegate; import org.chromium.base.test.params.ParameterAnnotations.ClassParameter; import org.chromium.base.test.params.ParameterAnnotations.UseRunnerDelegate; @@ -118,7 +119,7 @@ public final class HardwareVideoDecoderTest { return new HardwareVideoDecoderFactory(eglContext); } - private VideoDecoder createDecoder() { + private @Nullable VideoDecoder createDecoder() { VideoDecoderFactory factory = createDecoderFactory(useEglContext ? eglBase.getEglBaseContext() : null); return factory.createDecoder(codecType); diff --git a/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java b/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java index ef0be1427f..9789db8329 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; import org.chromium.base.test.params.BaseJUnit4RunnerDelegate; import org.chromium.base.test.params.ParameterAnnotations.ClassParameter; import org.chromium.base.test.params.ParameterAnnotations.UseRunnerDelegate; @@ -291,7 +292,7 @@ public class HardwareVideoEncoderTest { eglContext, ENABLE_INTEL_VP8_ENCODER, ENABLE_H264_HIGH_PROFILE); } - private VideoEncoder createEncoder() { + private @Nullable VideoEncoder createEncoder() { VideoEncoderFactory factory = createEncoderFactory(useEglContext ? eglBase.getEglBaseContext() : null); VideoCodecInfo[] supportedCodecs = factory.getSupportedCodecs(); diff --git a/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java b/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java index ad4a4d170f..a5b27f86f5 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java @@ -35,6 +35,7 @@ import android.support.test.annotation.UiThreadTest; import android.support.test.filters.MediumTest; import android.support.test.filters.SmallTest; import android.support.test.rule.UiThreadTestRule; +import javax.annotation.Nullable; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.junit.Before; import org.junit.Rule; @@ -147,7 +148,7 @@ public class NetworkMonitorTest { } private static final Object lock = new Object(); - private static Handler uiThreadHandler = null; + private static @Nullable Handler uiThreadHandler = null; private NetworkMonitorAutoDetect receiver; private MockConnectivityManagerDelegate connectivityDelegate; @@ -155,10 +156,11 @@ public class NetworkMonitorTest { private static Handler getUiThreadHandler() { synchronized (lock) { - if (uiThreadHandler == null) { - uiThreadHandler = new Handler(Looper.getMainLooper()); + Handler handler = uiThreadHandler; + if (handler != null) { + return handler; } - return uiThreadHandler; + return uiThreadHandler = new Handler(Looper.getMainLooper()); } } diff --git a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java index a88bd4eb15..8272830a92 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java @@ -34,6 +34,7 @@ import java.util.Queue; import java.util.TreeSet; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.DisabledTest; import org.junit.Before; @@ -48,7 +49,7 @@ import org.webrtc.PeerConnection.SignalingState; @RunWith(BaseJUnit4ClassRunner.class) public class PeerConnectionTest { private static final int TIMEOUT_SECONDS = 20; - private TreeSet threadsBeforeTest = null; + private @Nullable TreeSet threadsBeforeTest = null; @Before public void setUp() { @@ -530,8 +531,8 @@ public class PeerConnectionTest { private static class SdpObserverLatch implements SdpObserver { private boolean success = false; - private SessionDescription sdp = null; - private String error = null; + private @Nullable SessionDescription sdp = null; + private @Nullable String error = null; private CountDownLatch latch = new CountDownLatch(1); public SdpObserverLatch() {} @@ -572,11 +573,11 @@ public class PeerConnectionTest { return success; } - public SessionDescription getSdp() { + public @Nullable SessionDescription getSdp() { return sdp; } - public String getError() { + public @Nullable String getError() { return error; } } diff --git a/sdk/android/instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java b/sdk/android/instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java index 563336b984..cf2529d182 100644 --- a/sdk/android/instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java +++ b/sdk/android/instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java @@ -21,6 +21,7 @@ import android.support.test.filters.MediumTest; import android.support.test.filters.SmallTest; import java.nio.ByteBuffer; import java.util.concurrent.CountDownLatch; +import javax.annotation.Nullable; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.junit.Before; import org.junit.Test; @@ -37,7 +38,7 @@ public class SurfaceTextureHelperTest { public float[] transformMatrix; private boolean hasNewFrame = false; // Thread where frames are expected to be received on. - private final Thread expectedThread; + private final @Nullable Thread expectedThread; MockTextureListener() { this.expectedThread = null; diff --git a/webrtc.gni b/webrtc.gni index f91aa01579..cfc9cb0cf8 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -501,11 +501,25 @@ if (is_android) { # Treat warnings as errors. javac_args += [ "-Werror" ] + # TODO(crbug.com/824679): Find out why this fails in Chromium + if (!build_with_chromium) { + javac_args += [ + "-Xep:ParameterNotNullable:ERROR", + "-Xep:FieldMissingNullable:ERROR", + "-Xep:ReturnMissingNullable:ERROR", + ] + } + # Add any arguments defined by the invoker. if (defined(invoker.javac_args)) { javac_args += invoker.javac_args } + if (!defined(deps)) { + deps = [] + } + deps += [ "//third_party/jsr-305:jsr_305_javalib" ] + no_build_hooks = true } } @@ -524,6 +538,20 @@ if (is_android) { # Treat warnings as errors. javac_args = [ "-Werror" ] + # TODO(crbug.com/824679): Find out why this fails in Chromium + if (!build_with_chromium) { + javac_args += [ + "-Xep:ParameterNotNullable:ERROR", + "-Xep:FieldMissingNullable:ERROR", + "-Xep:ReturnMissingNullable:ERROR", + ] + } + + if (!defined(deps)) { + deps = [] + } + deps += [ "//third_party/jsr-305:jsr_305_javalib" ] + no_build_hooks = true } } @@ -542,6 +570,20 @@ if (is_android) { # Treat warnings as errors. javac_args = [ "-Werror" ] + # TODO(crbug.com/824679): Find out why this fails in Chromium + if (!build_with_chromium) { + javac_args += [ + "-Xep:ParameterNotNullable:ERROR", + "-Xep:FieldMissingNullable:ERROR", + "-Xep:ReturnMissingNullable:ERROR", + ] + } + + if (!defined(deps)) { + deps = [] + } + deps += [ "//third_party/jsr-305:jsr_305_javalib" ] + no_build_hooks = true } }