aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/internal/Checks.java
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2021-02-24 21:20:54 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-24 21:20:54 +0000
commit138b64feb682b90292d36002f3aff9869d6a9e4b (patch)
treefb060599e56a1ce3ccfa4cacd193406f14ba84db /src/main/java/org/junit/internal/Checks.java
parent99022df227f5503b68838d97e0a6b3fa5f558f1b (diff)
parent91c5e5ff9d71ebc00818b310c09b175016c36dc2 (diff)
downloadjunit-138b64feb682b90292d36002f3aff9869d6a9e4b.tar.gz
Merge changes from topic "revert-1601635-AIQYZOHWTP" am: 565f36d281 am: 23e304a839 am: 91c5e5ff9d
Original change: https://android-review.googlesource.com/c/platform/external/junit/+/1605377 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iaa51f5a85f96ec87a01eff9bc98e2274fc5a97dd
Diffstat (limited to 'src/main/java/org/junit/internal/Checks.java')
-rw-r--r--src/main/java/org/junit/internal/Checks.java37
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;
- }
-}