Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: remoting/android/java/src/org/chromium/chromoting/Preconditions.java

Issue 2035303002: [Chromoting] Decouple DesktopView and TouchInputHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/android/java/src/org/chromium/chromoting/Preconditions.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/Preconditions.java b/remoting/android/java/src/org/chromium/chromoting/Preconditions.java
index 5df5b781704c74fafabf88aa308c686246b8ce8b..f55955eaef86ac41d957c2369ab36593598faa11 100644
--- a/remoting/android/java/src/org/chromium/chromoting/Preconditions.java
+++ b/remoting/android/java/src/org/chromium/chromoting/Preconditions.java
@@ -34,4 +34,15 @@ public final class Preconditions {
}
return ref;
}
+
+ /**
+ * Checks whether input |ref| is a null reference, and return tis value. Throws
Lambros 2016/06/06 22:11:34 returns its value
Hzj_jie 2016/06/07 01:26:13 Done.
+ * {@link IllegalArgumentException} if |ref| is not null.
+ */
+ public static final <T> T isNull(T ref) {
+ if (ref != null) {
+ throw new IllegalArgumentException();
+ }
+ return ref;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698