diff options
author | David Srbecky <dsrbecky@google.com> | 2021-02-24 21:50:58 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-02-24 21:50:58 +0000 |
commit | 5cb7d97d73027edb2274ac39e8a958bab5e2e7b3 (patch) | |
tree | fb060599e56a1ce3ccfa4cacd193406f14ba84db /src/main/java/org/junit/internal/Checks.java | |
parent | f7adff9d456ec1fd10bfe84951d4756d78dbba6f (diff) | |
parent | 138b64feb682b90292d36002f3aff9869d6a9e4b (diff) | |
download | junit-5cb7d97d73027edb2274ac39e8a958bab5e2e7b3.tar.gz |
Merge changes from topic "revert-1601635-AIQYZOHWTP" am: 565f36d281 am: 23e304a839 am: 91c5e5ff9d am: 138b64feb6
Original change: https://android-review.googlesource.com/c/platform/external/junit/+/1605377
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic05d8452bb92220507ec751aa85c8e657f77cc79
Diffstat (limited to 'src/main/java/org/junit/internal/Checks.java')
-rw-r--r-- | src/main/java/org/junit/internal/Checks.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/main/java/org/junit/internal/Checks.java b/src/main/java/org/junit/internal/Checks.java deleted file mode 100644 index 9724947..0000000 --- a/src/main/java/org/junit/internal/Checks.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.junit.internal; - -/** @since 4.13 */ -public final class Checks { - - private Checks() {} - - /** - * Checks that the given value is not {@code null}. - * - * @param value object reference to check - * @return the passed-in value, if not {@code null} - * @throws NullPointerException if {@code value} is {@code null} - */ - public static <T> T notNull(T value) { - if (value == null) { - throw new NullPointerException(); - } - return value; - } - - /** - * Checks that the given value is not {@code null}, using the given message - * as the exception message if an exception is thrown. - * - * @param value object reference to check - * @param message message to use if {@code value} is {@code null} - * @return the passed-in value, if not {@code null} - * @throws NullPointerException if {@code value} is {@code null} - */ - public static <T> T notNull(T value, String message) { - if (value == null) { - throw new NullPointerException(message); - } - return value; - } -} |