Merge "Move null check rationale to sample code for clarity"
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 @@
*
* 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 @@
*
* 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 @@
* 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 {