From 187b0bc81afdb46e71622e5a682f93806b274b2e Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Thu, 1 Apr 2021 21:45:28 +0300 Subject: [PATCH] Add nonnull annotations (#2244) * Add nonnull annotations * Move to util.annotation * Add docs --- .../util/annotation/FieldsAreNonnullByDefault.mapping | 6 ++++++ .../util/annotation/MethodsReturnNonnullByDefault.mapping | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 mappings/net/minecraft/util/annotation/FieldsAreNonnullByDefault.mapping create mode 100644 mappings/net/minecraft/util/annotation/MethodsReturnNonnullByDefault.mapping diff --git a/mappings/net/minecraft/util/annotation/FieldsAreNonnullByDefault.mapping b/mappings/net/minecraft/util/annotation/FieldsAreNonnullByDefault.mapping new file mode 100644 index 0000000000..c33eb4443a --- /dev/null +++ b/mappings/net/minecraft/util/annotation/FieldsAreNonnullByDefault.mapping @@ -0,0 +1,6 @@ +CLASS net/minecraft/class_6319 net/minecraft/util/annotation/FieldsAreNonnullByDefault + COMMENT Specifies that all fields in the annotated package/class are nonnull + COMMENT unless nullability is specified with a separate annotation. + COMMENT + COMMENT

While this annotation is meant to be a package/class annotation, it can + COMMENT be applied to anything as it does not restrict its targets. diff --git a/mappings/net/minecraft/util/annotation/MethodsReturnNonnullByDefault.mapping b/mappings/net/minecraft/util/annotation/MethodsReturnNonnullByDefault.mapping new file mode 100644 index 0000000000..c023af489b --- /dev/null +++ b/mappings/net/minecraft/util/annotation/MethodsReturnNonnullByDefault.mapping @@ -0,0 +1,6 @@ +CLASS net/minecraft/class_6328 net/minecraft/util/annotation/MethodsReturnNonnullByDefault + COMMENT Specifies that all methods in the annotated package/class return nonnull + COMMENT values unless nullability is specified with a separate annotation. + COMMENT + COMMENT

While this annotation is meant to be a package/class annotation, it can + COMMENT be applied to anything as it does not restrict its targets.