summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2015-03-10 05:38:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-10 05:38:52 +0000
commitec480e5100b391635e83b64525d73164f38eeb71 (patch)
tree09dc7b3507b2b8060c9b83fda9310947a840752f
parentd61d442a5cd0f0f2e1adca26d73f1423319e2110 (diff)
parentec662a709ad6d45e19d23f2ae357fad96a766c69 (diff)
downloadlibcore-ec480e5100b391635e83b64525d73164f38eeb71.zip
libcore-ec480e5100b391635e83b64525d73164f38eeb71.tar.gz
libcore-ec480e5100b391635e83b64525d73164f38eeb71.tar.bz2
Merge "Revert "Remove unnecessary null checks in CloseGuard documentation sample code""
-rw-r--r--dalvik/src/main/java/dalvik/system/CloseGuard.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/dalvik/src/main/java/dalvik/system/CloseGuard.java b/dalvik/src/main/java/dalvik/system/CloseGuard.java
index 0301e50..df36867 100644
--- a/dalvik/src/main/java/dalvik/system/CloseGuard.java
+++ b/dalvik/src/main/java/dalvik/system/CloseGuard.java
@@ -40,7 +40,9 @@ package dalvik.system;
*
* protected void finalize() throws Throwable {
* try {
- * guard.warnIfOpen();
+ * if (guard != null) {
+ * guard.warnIfOpen();
+ * }
* cleanup();
* } finally {
* super.finalize();
@@ -74,7 +76,9 @@ package dalvik.system;
*
* protected void finalize() throws Throwable {
* try {
- * guard.warnIfOpen();
+ * if (guard != null) {
+ * guard.warnIfOpen();
+ * }
* cleanup();
* } finally {
* super.finalize();