diff options
author | Santiago Seifert <aquilescanta@google.com> | 2022-01-12 10:52:12 +0000 |
---|---|---|
committer | Santiago Seifert <aquilescanta@google.com> | 2022-01-12 10:52:12 +0000 |
commit | 18b9522380b2a2b85ecc17436eee435605564f72 (patch) | |
tree | d75b81b0568c6edbade98c5e72aa827c806dddc0 | |
parent | cadc7b809f0bdecef43f7f3ac6ca4ff3c5707cdf (diff) | |
download | exoplayer-18b9522380b2a2b85ecc17436eee435605564f72.tar.gz |
Add NonNull annotation
Required for the current tip of tree ExoPlayer version.
Bug: 201541781
Test: Built the affected targets.
Change-Id: Icfd4c74f4a0cc58d3fe4bb8b02f2dd5d75aebf9d
-rwxr-xr-x | annotation-stubs/gen_annotations.sh | 1 | ||||
-rw-r--r-- | annotation-stubs/src/org/checkerframework/checker/nullness/qual/NonNull.java | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/annotation-stubs/gen_annotations.sh b/annotation-stubs/gen_annotations.sh index 20703ce7..ba6048e7 100755 --- a/annotation-stubs/gen_annotations.sh +++ b/annotation-stubs/gen_annotations.sh @@ -9,6 +9,7 @@ ANNOTATIONS=( org.checkerframework.checker.nullness.qual.EnsuresNonNull org.checkerframework.checker.nullness.qual.EnsuresNonNullIf org.checkerframework.checker.nullness.qual.MonotonicNonNull + org.checkerframework.checker.nullness.qual.NonNull org.checkerframework.checker.nullness.qual.Nullable org.checkerframework.checker.nullness.qual.PolyNull org.checkerframework.checker.nullness.qual.RequiresNonNull diff --git a/annotation-stubs/src/org/checkerframework/checker/nullness/qual/NonNull.java b/annotation-stubs/src/org/checkerframework/checker/nullness/qual/NonNull.java new file mode 100644 index 00000000..8c956faa --- /dev/null +++ b/annotation-stubs/src/org/checkerframework/checker/nullness/qual/NonNull.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.checkerframework.checker.nullness.qual; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import kotlin.annotations.jvm.MigrationStatus; + +// NOTE: This is an autogenerated file. Do not modify its contents. See annotation_template.java and +// gen_annotations.sh under platform/external/exoplayer/annotation-stubs. + +// This is an annotation stub to avoid dependencies on annotations that aren't +// in the Android platform source tree. + +@Target({ + ElementType.ANNOTATION_TYPE, + ElementType.CONSTRUCTOR, + ElementType.FIELD, + ElementType.LOCAL_VARIABLE, + ElementType.METHOD, + ElementType.PACKAGE, + ElementType.PARAMETER, + ElementType.TYPE, + ElementType.TYPE_PARAMETER, + ElementType.TYPE_USE +}) +@Retention(RetentionPolicy.SOURCE) +public @interface NonNull { + + // These fields maintain API compatibility with annotations that expect arguments. + + String[] value() default {}; + + boolean result() default false; + + String[] expression() default {}; + + MigrationStatus status() default MigrationStatus.IGNORE; +} |