mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Add requireNull() utility method.
This commit is contained in:
@@ -22,4 +22,11 @@ public class NullSafety {
|
||||
@Nullable Object b) {
|
||||
if ((a == null) == (b == null)) throw new AssertionError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the argument is null.
|
||||
*/
|
||||
public static void requireNull(@Nullable Object o) {
|
||||
if (o != null) throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user