summaryrefslogtreecommitdiffstats
path: root/dalvik
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2015-03-10 21:04:20 -0700
committerBrian Carlstrom <bdc@google.com>2015-03-18 00:57:11 -0700
commita5dd2c63ad7c4ee7d3e042da28f00e6055b781b3 (patch)
treebf295ed16006c5b554013fad526eed26ba51ca65 /dalvik
parentd51ee9f74f4444470214098449feb44190b5827f (diff)
downloadlibcore-a5dd2c63ad7c4ee7d3e042da28f00e6055b781b3.zip
libcore-a5dd2c63ad7c4ee7d3e042da28f00e6055b781b3.tar.gz
libcore-a5dd2c63ad7c4ee7d3e042da28f00e6055b781b3.tar.bz2
Move null check rationale to sample code for clarity
Change-Id: Ieceff37477ec3189bda4bcead98aa7e27fcce345
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/system/CloseGuard.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/dalvik/src/main/java/dalvik/system/CloseGuard.java b/dalvik/src/main/java/dalvik/system/CloseGuard.java
index df36867..a45ffa1 100644
--- a/dalvik/src/main/java/dalvik/system/CloseGuard.java
+++ b/dalvik/src/main/java/dalvik/system/CloseGuard.java
@@ -40,6 +40,7 @@ package dalvik.system;
*
* protected void finalize() throws Throwable {
* try {
+ * // Note that guard could be null if the constructor threw.
* if (guard != null) {
* guard.warnIfOpen();
* }
@@ -76,6 +77,7 @@ package dalvik.system;
*
* protected void finalize() throws Throwable {
* try {
+ * // Note that guard could be null if the constructor threw.
* if (guard != null) {
* guard.warnIfOpen();
* }
@@ -94,12 +96,6 @@ package dalvik.system;
* in a method, the call to {@code open} should occur just after
* resource acquisition.
*
- * <p>
- *
- * Note that the null check on {@code guard} in the finalizer is to
- * cover cases where a constructor throws an exception causing the
- * {@code guard} to be uninitialized.
- *
* @hide
*/
public final class CloseGuard {